Copy link to clipboard
Copied
Hi all,
I'm trying to generate a dropdown menu, "Dropdown1," and have the selected displayed Item generate the Export Value instead of the Item itself. What would be the javascript and do I add this within the Actions or Calculate tab?
General-->Name: "Dropdown1"
Options-->
Item: Instructor Led Training
Export Value: ILT
Item: Computer Based Training
Export Value: CBT
Thanks in advance,
Copy link to clipboard
Copied
Hi,
This has been answered before.
Use this line of code:
event.value = event.target.getItemAt(event.target.currentValueIndices, true);
Answered by George_Johnson back in 2016: https://community.adobe.com/t5/acrobat/display-export-value-of-dropdown-instead-of-item/td-p/7936974...
Copy link to clipboard
Copied
No, it cannot be done from the Actions or Calculate tab. It can only be done from a custom Format event. Using the code that ls_rbls posted.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Hi,
This has been answered before.
Use this line of code:
event.value = event.target.getItemAt(event.target.currentValueIndices, true);
Answered by George_Johnson back in 2016: https://community.adobe.com/t5/acrobat/display-export-value-of-dropdown-instead-of-item/td-p/7936974...
Copy link to clipboard
Copied
I am new to all of this.
Do I have to enter any specific words in the line of code?
event.value = event.target.getItemAt(event.target.currentValueIndices, true);
General - Employee
Item - Name 1
Export - 2121
Item - Name 2
Export - 3131
Copy link to clipboard
Copied
No, it cannot be done from the Actions or Calculate tab. It can only be done from a custom Format event. Using the code that ls_rbls posted.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
thank you both, this worked!
Copy link to clipboard
Copied
I've tried this code but it doesn't seem to be working for me. Unless I'm not understanding the post and replies correctly. Let's say I have a list of the 50 states spelled out in the Items List, and when I select "Texas" I would like for it to show "TX" in the same list box.
Does the code mentioned here work for this?
Copy link to clipboard
Copied
Place the script in the custom format script section. See slide:

