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

Add export values to each item provided in an item list serving a drop down using javascript

Engaged ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

While I can easily enough populate a drop down list by creating a script using the setItems method to assign the values of an array to populate the items in a drop down list, is there a also property or method I can use to add/populate the export values for each and every item as well from inside my script? 

TOPICS
How to , JavaScript , PDF forms

Views

973

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

correct answers 1 Correct answer

Engaged , Feb 08, 2022 Feb 08, 2022

Resolved. Fortunately, I found an answer posted by Try67 back in January 2022. The solution is based on using a 2-dimensional array. Whoever would have thought? Though somewhat intuitive, I never would have guessed that creating a 2-dimensional aray with a 2nd element assigns an export value to each item in a drop down list. And here I always believed that the setItems method was solely intended to access/asign items to the drop down list. My final question was where in the tutorials provided by

...

Votes

Translate

Translate
Engaged ,
Feb 08, 2022 Feb 08, 2022

Copy link to clipboard

Copied

Resolved. Fortunately, I found an answer posted by Try67 back in January 2022. The solution is based on using a 2-dimensional array. Whoever would have thought? Though somewhat intuitive, I never would have guessed that creating a 2-dimensional aray with a 2nd element assigns an export value to each item in a drop down list. And here I always believed that the setItems method was solely intended to access/asign items to the drop down list. My final question was where in the tutorials provided by Adobe such as the Adobe Acrobat Javascript reference can this information be found? Under the setItems () method, I guess I should have read the fine print displayed to the right of the oarray parameter. Duh?

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
Community Expert ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

LATEST

Yes, it's described in the documentation of this method (highlighted below), and in the two last examples given there:

 

try67_1-1644398292796.png

 

 

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