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

    Why does hitting "Enter" in a box submit the form?

    Asked by dcpsforms on October 13, 2016 at 01:30 PM

    How can I fix it so that if someone hits "Enter", it doesn't automatically submit the form?

    Page URL:

  • Profile Image
    JotForm Support

    Answered by liyam on October 13, 2016 at 03:43 PM


    Unfortunately there is no option to disable the enter button to submit the form. But a workaround can be done. You can get the full source code of your form, place the form's source to your web page and modify the code to disable the enter button on submission of the form.

    Once you have the source of your form in a page, you can insert this code in between the <head> and </head> tags:

    <script type="text/javascript">

    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;