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

Select Item from Dropdown list but export a different value

New Here ,
Aug 06, 2020 Aug 06, 2020

Copy link to clipboard

Copied

I'm using a Dropdown List box. I have already added the "Items" to be displayed. However, when I select an item, I would like for a different value to be exported in to the same box. For example: Let's say my list contains the list of the 50 states, each state spelled out. When I select "Texas", I would like for the value exported to be "TX".

 

Snooping around I found this code, but nothing happens

event.value = event.target.getItemAt(event.target.currentValueIndices, true);

I'm inserting it in the Validate tab - Run Custom Validation Script. I've also tried it on the Calculate tab - Custom Calculation Script:

 

Is there something I'm missing here?

Any help would be much appreciated. Thanks

TOPICS
Acrobat SDK and JavaScript

Views

275

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 ,
Aug 06, 2020 Aug 06, 2020

Copy link to clipboard

Copied

LATEST

Place the code as custom format script.

 

See slide:

 

exportvalue-custom-combobox.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