4 Replies Latest reply on Jan 6, 2012 2:25 AM by radzmar

    How to automatically navigate to the next field without pressing the TAB key?

    Tom Beaty Level 1

      The form has phone number fields, they are not actual special formats for phone numbers, they did not do that to begin with.    So the phone number of form will end up being entered into two different fields one numeric 3 digit and (the next in tab order) is a text field with validation text{999-9999} .   What user is asking for now is this sort of flow:

        1. User of from tabs into the 3 digit number field
        2. Types one digit,
        3. Then another
        4. And another
        5. After they type the third digit the form should automatically move to the text field
        6. After it fills up with an acceptable 999-9999 string then that field should move the focus onto the next field in tab order. 


      I can get the ‘full’ event to move focus to the next field but that happens only when the forth number is keyed, but that number is not passed to the text field.   Could not find a way of ‘carrying’ that number forward and placing the cursor to its right. 


      So I was looking at the ‘Change’ event, to set up an IF like this:

      if (this.length = 3 ) then xfa.host.setfocus("TX17") ;


      from what I can tell this does not get a length until TAB or ENTER is pressed.   Can anyone help?