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

I require some help writing a javascript for a pdf form with a dropdown menu

New Here ,
Nov 24, 2017 Nov 24, 2017

Copy link to clipboard

Copied

I require some help writing a javascript for a pdf form.  I have a dropdown menu listing all 12 of our Committees.  What I would like to do is when someone selects one of the committees from the dropdown menu a code assigned to a specific committee will automatically appear in another text box.

Example:

they select "Executive Committee" from the dropdown box

the code for Executive Committee is "561"

the code 561 will automatically appear in a separate textbox 

Could someone provide me with step by step instructions and the javascript I should use?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

361

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

Community Expert , Nov 24, 2017 Nov 24, 2017

All you have to do is set the code as the "Export Value" for each item in your field and then use this simple custom calculation script in the text field where you want to display it:

event.value = this.getField("Committee").valueAsString;

Make sure to tick the option to immediately commit the selected value of the drop-down field for it to work the moment a selection is made.

Votes

Translate

Translate
Community Expert ,
Nov 24, 2017 Nov 24, 2017

Copy link to clipboard

Copied

All you have to do is set the code as the "Export Value" for each item in your field and then use this simple custom calculation script in the text field where you want to display it:

event.value = this.getField("Committee").valueAsString;

Make sure to tick the option to immediately commit the selected value of the drop-down field for it to work the moment a selection is made.

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 24, 2017 Nov 24, 2017

Copy link to clipboard

Copied

LATEST

Thank you for the instructions.  They worked!

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