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

Simple Array Help

GlennOwns
Registered: Jun 30 2010
Posts: 18

I have a custom validation script set up for 20 consecutive form fields.
The fields follow a naming scheme "8_1," "8_2," 8_3," etc...

Once the [Enter] key is pressed (not tab key), it allows this field to jump DOWN to the next field (eg: 8_1 to 8_2 or 8_18 to 8_19. This is, however, different from tabbing over, i set up a different tabbing scheme.

TLDR: how to turn this into an array?

Under "Run Custom Validation Script"

this.getField('8_2').setFocus();
this.getField('8_3').setFocus();
this.getField('8_4').setFocus();
this.getField('8_5').setFocus();
this.getField('8_6').setFocus();
this.getField('8_7').setFocus();
this.getField('8_8').setFocus();
this.getField('8_9').setFocus();
this.getField('8_10').setFocus();
this.getField('8_11').setFocus();
this.getField('8_12').setFocus();
this.getField('8_13').setFocus();
this.getField('8_14').setFocus();
this.getField('8_15').setFocus();
this.getField('8_16').setFocus();
this.getField('8_17').setFocus();
this.getField('8_18').setFocus();
this.getField('8_19').setFocus();
this.getField('8_20').setFocus();

Thanks in advance!

Update:
Each field has one custom validation

Field "8_1" would contain the custom validation script
this.getField('8_2').setFocus();
Field "8_9" would contain the custom validation script
this.getField('8_10).setFocus();
Field "8_19" would contain the custom validation script
this.getField('8_20).setFocus();

My Product Information:
Acrobat Pro 9.3.1, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
It's not clear to me what code you have in an individual field, or what you mean by "turn this into an array". Can you clarify what you need and why you need it?
GlennOwns
Registered: Jun 30 2010
Posts: 18
George_Johnson wrote:
It's not clear to me what code you have in an individual field, or what you mean by "turn this into an array". Can you clarify what you need and why you need it?
Sorry for the confusion. I've clarified on the original post.

thanks.