Highlighted

Dropdown list: Select Item, but display Export Value

Community Beginner ,
May 06, 2020

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, 

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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. 

TOPICS
Create PDFs, Edit and convert PDFs, PDF forms

Views

467

Likes

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

Dropdown list: Select Item, but display Export Value

Community Beginner ,
May 06, 2020

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, 

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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. 

TOPICS
Create PDFs, Edit and convert PDFs, PDF forms

Views

468

Likes

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
May 06, 2020 1
Adobe Community Professional ,
May 06, 2020

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...

 

Likes

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
Reply
Loading...
May 06, 2020 0
New Here ,
Jun 09, 2020

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

 

 

Likes

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
Reply
Loading...
Jun 09, 2020 0
Adobe Community Professional ,
May 06, 2020

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. 

Likes

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
Reply
Loading...
May 06, 2020 0
Community Beginner ,
May 06, 2020

Copy link to clipboard

Copied

thank you both, this worked!

Likes

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
Reply
Loading...
May 06, 2020 0
New Here ,
Aug 06, 2020

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?

Likes

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
Reply
Loading...
Aug 06, 2020 0
ls_rbls LATEST
Adobe Community Professional ,
Aug 06, 2020

Copy link to clipboard

Copied

Place the script in the custom format script section. See slide:

 

 

exportvalue-custom-combobox.png

Likes

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
Reply
Loading...
Aug 06, 2020 0