Auto Populate text or list box from a drop down menu
Copy link to clipboard
Copied
Hi can anyone help
Im trying to understand the basics of using PDF forms to Auto Populate a text box or list box.
My example is
Dropdown menu would have three options
A B and C
A = 10 , B = 20 and C = 30.
So I want to be able to select A in the drop down menu and the number 10 to appear or be selected in another box. Then if B is selected the number 10 would change to 20 and so on. Can anyone help.
Thank you
My simplest example is below. I'm planning on using this for something else but as long as the script works and I can change the options instead of a,b and c and the numbers its fine thanks
Copy link to clipboard
Copied
Lets say your dropdown field is named "Dropdown1"
As "custom calculation script" of text field use this:
event.value = this.getField("Dropdown1").value;
EDIT: I assume you know how to set items in dropdown and give them export value?
Copy link to clipboard
Copied
Greetings and thank you for your help previously. My question is of I have 2000+ names, will I have to copy and paste in the "custom calculation script" 2000 times? Surely there must be a better way..
Copy link to clipboard
Copied
++ Adding to the guidance of NesaNurani,
To work around that, you must use the JavaScript script from George Johnson or one of the free tools offered by ACP Thom Parker or Try67 in the link below:
Once you have your dropdown field populated with the 2,000+ entries, To add a unique export value to each of the 2,000+ entries in bulk, you must develop a more complex JavaScript script or simply take your time to add it manually one by one.
See how is possibly done with the references linked below:

