You are viewing limited content. For full access, please sign in.

Question

Question

LF Forms - auto advance cursor to next field

asked on November 3, 2017

I was wondering if there is a way I can set a form to auto advance the cursor to the second field once the appropriate number of digits has been entered in the first field.

I have a process where an operator enters a series of 26 single digits reading from a vendor product sheet. The data that is sent from the form however is needing to be in different fields. Field 1 has 3 of the 26 digits, field 2 has 6 of the 26, and so on. Normally they just "ten key" the 26 digits and move to the next entry. Excel allows you to limit the field length, and it moves to the next cell automatically once the previous is filled. It also works with a bar code scanner and all the digits get entered in the correct cells.

0 0

Replies

replied on November 3, 2017 Show version history

You can use .focus to move to the next field (or previous field, perhaps when the user keys up a backspace (key 8) when the field is empty)

   $('#q1 input').keyup(function() {
     if(this.value.length == 5) {
         $('#q2 input').focus();
     }
   });

Another thing you could do is just have calculations extract digits from your 26 digits into different fields. Here's an example extracting digits from a phone number.

Calculations are located under field options > Advanced tab. You'd be able to hide these fields as necessary, and not worry about JavaScript or the CSS formatting of the many fields you'd have otherwise.

 

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.