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

    Can we make the submit button compulsory?

    Asked by olay on November 16, 2011 at 07:19 AM

    Hi,

    We created a form to be used on iPad and many users reported that they hit the "Return" key by mistake (instead of a delete button which is easily done) and the form is submitted without the user actually click on "Submit" button.

    Is there anyway that we could either make the Submit button compulsory i.e. users must click to submit the survey

    OR disable the return key somehow.

    I'd really appreciate your advice.

    Many Thanks

     

    Olay

    Page URL:
    http://form.jotform.com/form/12574522233

  • Profile Image
    JotForm Support

    Answered by liyam on November 16, 2011 at 01:31 PM

    This is possible but not within the JotForm's functionality or while it's hosted in JotForm.

    You will need to embed the HTML source code to your own webpage as this requires javascript for it to happen (Unfortunately, you cannot code javascript in JotForm's form editor).

    To do this, create your own HTML page and then copy and paste the source code to your HTML file. Next, insert this script below within the opening and closing header tags of your HTML source code:

    -----------------------------------------------------

    <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;

    </script>

    -----------------------------------------------------
    reference source(link):

    Please let us know if you need further assistance.