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

    Enter key is submitting incomplete form. How do I deactivate?

    Asked by polktft on December 31, 2011 at 07:30 AM

    Anytime the Enter key is pressed, it is causing my form to be submitted.  How do I disable this?

    Too many people will press the enter key instead of using mouse or tab key.

    Bernie

  • Profile Image
    JotForm Support

    Answered by liyam on December 31, 2011 at 08:26 AM

    To prevent your forms from getting submitted when pressing the enter key, you can try setting the fields as required by clicking on the form element and then turning on 'Required' tool in the tool bar, just above the form editor.

    This way, if they press enter, it will alert the form that there are still some required fields that are left blank.

    Another alternative way is exporting your HTML source code to your own HTML file.  Then you can paste this code within the header (<head> script here </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>

    Please let us know if you need further assistance regarding this matter.

  • Profile Image

    Answered by polktft on December 31, 2011 at 08:40 AM
    Thanks, I did that a few minutes ago.
    Bernie