How can I prevent the enter key button from submitting a form for my customers?

  • Profile Image
    Asked on April 24, 2019 at 05:07 PM

    Hi! Some of my customers are in the habit of hitting the enter button when they complete a form question. (They should be pressing TAB but they aren't.) 

    When they hit "enter," it submits the form. Is there any way to turn that off? I'm getting incomplete form submissions. It would be nice if they could submit the form only by pressing the "Submit" button.

    Please help.

    Betty Jean

  • Profile Image
    Answered on April 24, 2019 at 06:49 PM

    Sorry, but 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 is to do it outside JotForm. Just get your form's Full Source Code, deploy it on your website, and use Javascript to prevent the Enter key from submitting the form.

    Complete guide:

    If you ever decided to use the full form source code, there are a lot of guides / article online that shows how to implement this using JQuery language.

    By the way, another simpler solution is to set field as "Required". Pressing enter won't proceed unless all required fields are filled.

    Let us know if you have any questions or if you need further assistance.