These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Automatically move to next field

russellcorrie
Registered: Apr 22 2010
Posts: 7

I am creating a form with 9 digits - each digit must appear in its own separate field. Is there a way to enter a digit in one field automatically jump to the next field? The users could press tab to move to the next field, however, I wanted something a little more simpler.

Any help would be great.

Thanks!

Russell

Russell Corrie
Adobe Acrobat Pro X
Windows & Mac

My Product Information:
Acrobat Pro Extended 9.3.1, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Have you looked at the 'Comb' option for the text field?

If you want to code your own, see [url=http://www.planetpdf.com/developer/article.asp?ContentID=javascript_setfocus_method_f&gid=6267]JavaScript - setFocus Method for tabbing to next form field[/url].

George Kaiser

russellcorrie
Registered: Apr 22 2010
Posts: 7
Thanks for the response. I viewed the sample PDF that was attached to the tutorial and it worked, however, when I inserted the script into my own document, no luck.

Russell Corrie
Adobe Acrobat Pro X
Windows & Mac

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Have you added the document level JavaScript function 'AutoTab()' from the sample?
function AutoTab(doc, event, cNext){// Call the built-in routine to allow numbers only.AFNumber_Keystroke(0, 0, 0, 0, "", true);// If we've filled in the field completely, jump to the next one.if (event.rc && AFMergeChange(event).length == event.target.charLimit)doc.getField(cNext).setFocus();}

George Kaiser