Advance to next field with the Enter Key or a Next Button

  • Profile Image
    DanMohr
    Asked on February 28, 2013 at 09:07 PM

    Is there code that can be injected to advance to the next field with the Enter Key and Next key?  My last field is a comments box so it would not work there.  Also, I have to hit the submit button twice to get the form to submit.  The first time it removes the keyboard and the second time it submits.  I need it to submit the form when the submit button is touched.  This form will be running on my Nexus tablet.  Thanks for your help.

    You may insert the code directly into my form or I can copy/paste.

  • Profile Image
    Welvin
    Answered on March 01, 2013 at 01:28 AM

    Hi Dan,

    I think that is the behaviour of the form when access on a mobile device. You will have to touch/drag the screen to move up and down to get into the next field. When you are in text area field or comment box on your form, you will have to touch the "down arrow" located down left to remove the touchkeys/keyboard and to be able to submit.

    Screen:

    Excerpt from the screen provided, is this not the interface of your Nexust Tablet?

     

    Thanks

  • Profile Image
    DanMohr
    Answered on March 01, 2013 at 02:46 AM
    I will be using this form on the Nexus tablet as a kiosk, and so I need it to be very easy to use. I will not be able to explain to everyone how to advance to the next field. Also, why do I have to press the submit button twice to get it to submit? Not very intuitive for the users.

  • Profile Image
    EltonCris
    Answered on March 01, 2013 at 07:18 AM

    @DanMohr

    To my knowledge, that is how it works on android mobile. It get rid of the keyboard first before it submits the form. Unfortunately it is not an easy function as it involves scripting for mobiles. Javascript might help but couldn't assure you with that. Can you please check if this works on your mobile? I have injected some scripts which moves to the next field when "enter key" is pressed.

    https://shots.jotform.com/elton/test_enter_key_on_mobile.html

    We'll wait your reply. Thanks!

  • Profile Image
    DanMohr
    Answered on March 04, 2013 at 05:21 AM
    I tried the form with the code you added, but it is now worse. The code does advance focus to the next field, but the keyboard goes away each time so it works basically the same. Except now using the enter key it completely skips the last 2 fields (not required) and submits the form. But now I only have to hit the submit button once to get it to submit the form, which is better. Can it be tweaked further?

  • Profile Image
    EltonCris
    Answered on March 04, 2013 at 07:25 AM

    Thanks for your reply. I too suspects it's functionality on an actual device, but it seems to be working fine on an android emulator at browserstack. Is it because you are pressing the "Go" button instead of the "next" one? I will try to look into this further but since it is outside from JotForm anymore, I couldn't promise anything if I could get the expected result. My knowledge on javascript is very limited but I will try my best for this. I'll let you know if I have any updates.

    Thanks!

  • Profile Image
    abajan
    Answered on March 04, 2013 at 07:36 AM

    Hi Dan,

    For what it's worth, here's a demo I made some time ago that has a script which causes the focus to advance to the next field upon hitting [Enter] but I can't say for sure if it helps because like my colleague, I only have emulators at my disposal.


    Wayne