How do i change the focus from one text field to another text field when it reaches the maximum length?

For Example,I am having three text fields with length 3,2 and 4.

When the first field reaches the maximum length (3) it needs to change the focus automatically to second field.

Kindly help on this.


    CommentAdd your comment...

    1 answer


      One way you could achieve auto-tabbing is to use a JQuery plugin such as https://github.com/Mathachew/jquery-autotab

      You would need to:

      • Add a Javascript Library to your form to load the JQuery autotab plugin
      • Add another custom Javascript Library to apply autotab to your desired fields, such as:
         $('.phone input').autotab('phone');
      • Make sure to add the 'phone' class to all of your phone fields via the Custom Styling panel while in advanced mode
      If you wanted to provide a similar user experience using masking instead of auto-tabbing, you could use a JQuery masking plugin such as http://digitalbush.com/projects/masked-input-plugin/, and apply the masking with a custom Javascript Library using a selector like:

          $(".phone input").mask("999-99-9999");

      1. Madhusuthanan P

         $('.phone input').autotab('phone');

        In the above Statement,we are not using any class for phone number group,instead we have to use it for individual fields each with a unique field ID


      2. Unknown User (bfrost)

        You can use a different form of the JQuery selector to select multiple IDs, such as:


      CommentAdd your comment...