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

Jumping without hitting tab

casey1313
Registered: Oct 5 2008
Posts: 1

I have a fillable from which i have created and would like in certain areas for the curcor to jump to the next field without having to hit tab. Phone number is a perfect example: area code (limited to 3 character) auto jump to prefix......and so on. I could use it in a few areas such as social security # and date.

Thanks for any help!

My Product Information:
Acrobat Standard 9.0, Windows
maxwyss
Registered: Jul 25 2006
Posts: 256
There are some examples of that code floating around.

You would have to evaluate the input in the Keystroke event, and when full set the focus to the next field.

One thing to seriously keep in mind is that limiting the format of phone numbers to the USAn format will make the form completely unusable as soon as you get international.

Hope this can help.

Max.
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
Take a look at tip #45 in Ted Padova's [url=http://www.acrobatusers.com/tutorials/2007/10/101_forms_etips/101FormseTips.pdf]101 Forms eTips[/url].

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
With version 6 and above there is the text field property of "Comb" which will work for a single field that looks like a comb field. But there will be no jump to the next field or if your users have Acrobat/Reader below version 6, there is no comb field property. For either of these situations you need to provide some special custom keystroke code and set the field character limit. Ted Padova provide the "goNext()" function for Acrobat/Reader version 4.05 for numeric fields:

// document level or application folder scrlipt
function goNext(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();
}
// end of function

Custom keystroke script for a field:

goNext(this, event, "nextFieldName");

George Kaiser