How do I make sure that the only way a form is submitted is by clicking the "SUBMIT" button?

  • Profile Image
    Asked on February 02, 2015 at 12:10 PM

    Currently any time I hit the "enter" key while filling out the form, it submits.

  • Profile Image
    Answered on February 02, 2015 at 12:57 PM

    To prevent the form to be submitted by pressing Enter key, you may consider adding required status to the fields on your JotForm.

    When the form is tried to submit with blank fields, it displays an error for the fields where they were set as required.

    Alternatively, you may also consider getting the source code of the from to embed on your webpage by adding the following script to header section i.e., in between <head></head> tags.

    <script language=javascript type=text/javascript>

    <!-- Script courtesy of - Your Guide to Professional Web Site Design and Development -->

    function stopRKey(evt) {

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

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

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


    document.onkeypress = stopRKey; 


    Hope this information helps. Please let us know if you need any further assistance.