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

Auto Tabbing

MJF
Registered: Jan 18 2007
Posts: 33

I have created 5 text boxes labelled: Acct.0, Acct.1, Acct.2, Acct.3 & Acct.4. I have given each box a maximum allowance of 1 character. I would like the form to move automatically from one text box to the next without having to hit the tab button manually. I know you need to use javascript but unfortunatly, I don't how to script it. Could you please help me with the scripting?
Thank You

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
How you implement it is different depending on what forms technology your using. XFA if it was created in LiveCycle Designer or AcroForms if it was created in Acrobat.

Either way the basic idea is to place a script in the change event of the field that tests the length of the input and changes focus to either the previous or next field depending on the direction of the change. In Acrobat JavaScript the code for changing focus would be something like this.
var strFinal = event.value.split().splice(if(..change in field data..)this.getField("NxtFld").setFocus();elsethis.getField("PrevFld").setFocus();

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

MJF
Registered: Jan 18 2007
Posts: 33
I gave up on this in April because I could not figure it out, even with the scripting you provided. I am using Acrobat pro 8 for windows. I want the curser to automatically tab to the next field on the right after I enter 1 digit. I have formated the text field to accept 1 character only. You mentioned that I need to place the scripting in the change event of the field. Is that on the field properies under Validate?
I am determine to figure it out this time. Is there a simpler way to script this? If not, could you please explain the sripting in more detail or simpler terms?
Thank You
mfj
MJF
Registered: Jan 18 2007
Posts: 33
A:This link will take you to an example that is open sourced (meaning you can copy and paste the code).

It was developed for Acrobat (not LiveCycle). Try it out, examine and copy the code.

[url=http://www.box.net/shared/static/8mob3x3ru7.pdf]http://www.box.net/shared/static/8mob3x3ru7.pdf[/url]

Hope this helps.

— Answered by Eugene Williams

Thank You Eugene for all your healp!
It works great!
mjf
dreamer
Registered: Dec 3 2007
Posts: 7
That's the problem with those links - they are gone after a while and we are as dumb as before...
jeffb00
Registered: Jan 11 2008
Posts: 2
Eugene,

Can you repost the file or send me a copy of that code. I need to complete an autofill document with autotabbing.
Thank you,