How to Disable the form using Enter Key

  • leonardoaltieri
    Perguntado em 27 de outubro de 2023 às 08:07

    Bom dia

    Uso há pouco tempo, procurei nas confgs mas não encontrei a opção.

    Na primeira utilização que fiz com alunos, alguns apertaram o Enter e enviaram antes de concluir.

    A alternativa que pensei foi colocar todos os campos como obrigatórios, mas não seria o ideal.

    Há como desativar o envio do formulário usando a tecla enter?


    obrigado

  • Carlo Jotform Support
    Respondido em 27 de outubro de 2023 às 10:31

    Hi leonardoaltieri,

    Thanks for reaching out to Jotform Support. Unfortunately, our Portuguese Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Portuguese, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. We do need to understand that the use of the Enter key to submit a form is a universal HTML5 standard. This is an important accessibility tool that assists disabled users when using a mouse is not an option. That is why, as of the moment, it is not possible to disable that functionality. But, we do have some workarounds that could help prevent accidental submissions when the user presses the Enter key. You could set a field as required. Let me show you how:

    1. From your Form Builder, select the Element you want to set as Required.
    2. Click on the Settings icon and go to the General tab.
    3. Under it, toggle Required to “On” to make the field mandatory.

    1655319505 62aa2bd1736bb  Screenshot 10 Screenshot 20 How to Disable the form using Enter Key Image 1 Screenshot 31 You can check out this article for the full guide: Set Field as Required or Non-required

    Another option is to add the Preview Before Submit widget to your form if you don't want to make the form fields as required. When a user presses the Enter key while filling out an input form, this widget will prohibit submission.

    Give it a try and let us know if you need any other help.