What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How can I stop the 'Return' button from triggering the submit button?

    Asked by ModestMedia on April 29, 2016 at 01:47 AM
    Page URL:
    https://form.jotform.co/61187438430860

    stop Return how how can i
  • Profile Image
    JotForm Support

    Answered by beril on April 29, 2016 at 04:39 AM

    If you want to prevent submitting the form when user presses the return key you can add the following code between your head tags.

    <script language=javascript type=text/javascript>

    <!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development 

    function stopRKey(evt) {

       var evt = (evt) ? evt : ((event) ? event : null);

       var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);

       if ((evt.keyCode == 13) && (node.type=="text")) {return false;}

    }

    document.onkeypress = stopRKey; 

    -->

     

    </script>

    To do that, you need to download your source code.

    If this does not resolve the issue, please let us know and we will be glad to take another look.