cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically Tabbing to next field

Former Member
0 Kudos

Hi,

I have 4 input fields, with maximum length 2,3,3 and 3 respectively. While entering values to the fields, the control has to tab to next field automatically once the field reaches its maximum length.

I tried some script in 'full' and 'change' events, but the full event is called only when we try to cross the field's maximum length, and 'change' event is called for every key stroke and always returns 'null' for 'this.rawValue' .

How can I do it?

Thanks,

Prabhakar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prabhakar,

you can use the change event. If max length of your field is 3 then use the javaScript like following:

if (xfa.event.selStart==2 && xfa.event.selEnd!=3) xfa.host.setFocus(YourNextField.somExpression);

Michal

Former Member
0 Kudos

Hi Michal,

Your code works for me.

Thanks for your help.

Regards,

Prabhakar.

Answers (1)

Answers (1)

Former Member
0 Kudos

I just re-examined the available events, & I'm not sure that's possible since there's really no event ocurring other than an "end-of-field" or something.

It's unfortunate that the FULL event wouldn't work.. Adobe has their own LCD help forum - you may want to ask over there.