• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I need to tab into an autofill field but skip fields in between

New Here ,
Nov 11, 2022 Nov 11, 2022

Copy link to clipboard

Copied

I have a form with several text fields that use the same name in order to autofill, i need to be able to set the tab order to skip fields and go directly into those fields. I have tried using the following code, but it doesn't work I'm assuming because there is more than one field with the same name. Is there a way to do this? this.getField("FieldName").setFocus();

TOPICS
Acrobat SDK and JavaScript

Views

226

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 11, 2022 Nov 11, 2022

Copy link to clipboard

Copied

Set fields as read-only to exclude them from the tab order.

Or you can adjust your code like this:

this.getField("FieldName.0").setFocus();

Or:

this.getField("FieldName.1").setFocus();

etc.

Each index number corresponds with one field in the group.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 11, 2022 Nov 11, 2022

Copy link to clipboard

Copied

LATEST

Perfect!  And now I see what was keeping it from working, I needed to use ".1" and so on.  

thank you for the help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines