Input table: Pressing ENTER key when navigating through the field submits the form

  • Profile Image
    AdminIOC
    Asked on October 28, 2020 at 10:12 AM

    Hi there,

    I used the input table form element in my form.

    When I start to fill a cell and I press the enter key, it submit the form instead of change cell.


  • Profile Image
    JohnRex
    Answered on October 28, 2020 at 11:16 AM

    Hello @AdminIOC - This isn't a bug but rather a consensus agreed upon and described in the HTML5 specifications. All forms were designed that way (regardless if it's built in Jotform or not).

    This is something referred to as Implicit Submission. 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 (all modern browsers) are strongly encouraged to support this.

    Unfortunately, there is no option to disable this feature on Jotform alone. If you really want to suppress this default behavior of forms, the only way around it is to get your form's entire source code and use Javascript to prevent the Enter key from submitting the form.

    Also, to navigate through the Input Table field, TAB key can be used.

  • Profile Image
    AdminIOC
    Answered on October 28, 2020 at 11:52 AM

    Hi there,

    Thanks for your answer.

    So why is it happens only when my focus is on this field and not in another like simple text field.

  • Profile Image
    JohnRex
    Answered on October 28, 2020 at 12:56 PM

    I have just conducted a test with a form having a SHORT ENTRY TEXT and INPUT TABLE field, and it both submits when I hit the ENTER key.

    Maybe there were REQUIRED fields that were left "unfilled" when you pressed the ENTER key while the cursor is in the text field. Note that the SUBMIT function will only work if all REQUIRED fields are filled, or there were no REQUIRED fields in the form at all.

    Please try this form: https://form.jotform.com/203014918932049