skip to Main Content

I am trying to display a message if the user click in the submit button and the form is valid. I am using Shopify for that. Is there a way to do that with JavaScript or in Liquid?

Thanks in advance.

2

Answers


  1. you can add onclick event and write javaScript code to validate this
    ex

    <script type='text/javaScript'>
    function do()
    {
    
    }
    </script>
    <input type='button' onClick='do()'/>
    
    Login or Signup to reply.
  2. The simplest solution would be a pop-up message using the following:

    onclick: ‘alert(“Message”)’

    Just add that as an attribute to your button in your HTML document, with “Message” being replaced with whatever you want your message to be.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search