How can I prevent users from submitting the form when the enter key is pressed?

  • BartonWilby
    Asked on October 17, 2018 at 10:53 AM

    1. It appears that if return if pressed (possibly in error) during completion of a form for submission, it is automatically submitted (in half-finished state) and the submitter gets a 'thank you' message.   Can the form only be submitted if the word 'submit' is pressed?

    2. It appears that the submitter of a form doesn't have a facility to print a copy of what they have submitted.  Once received into our mail box, we can respond and send them a copy.  However, the line at the bottom of forms 'You can edit this submission and view all your submissions easily' is confusing to the submitter and ideally we do not want it to appear.  Can it be suppressed?
  • Support_Management Jotform Support
    Replied on October 17, 2018 at 12:01 PM

    1. It appears that if return if pressed (possibly in error) during completion of a form for submission, it is automatically submitted (in half-finished state) and the submitter gets a 'thank you' message.   Can the form only be submitted if the word 'submit' is pressed?

    All forms were designed that way (regardless if it's built in Jotform or not). This is something referred to as Implicit Submission as described on HTML5 specifications. This is important to accessibility, assistive technologies and impaired users that cannot use a mouse at all. There are pages on the Web that are only usable if there is a way to implicitly submit forms, so user agents (browsers) are strongly encouraged to support this.

    If you really want to suppress this default behavior of forms, the only way around it with JotForm is to get your form's entire source code and use Javascript to prevent the Enter key from submitting the form.

    I found a really good read about this topic on this post in case you're interested to know why it was designed that way. At the latter part of that post will be alternatives on suppressing it (especially the Explicit Prevention part where they gave an example JS code snippet to prevent it).

    2. It appears that the submitter of a form doesn't have a facility to print a copy of what they have submitted.  Once received into our mail box, we can respond and send them a copy.  However, the line at the bottom of forms 'You can edit this submission and view all your submissions easily' is confusing to the submitter and ideally we do not want it to appear.  Can it be suppressed?

    This question was moved to a separate thread to avoid confusion:

    https://www.jotform.com/answers/1613869

    I'll reply to you there shortly.