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?
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.
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.
Copy link to clipboard
Copied
Thank you for the instructions. They worked!