Copy link to clipboard
Copied
I'm using Acrobat Pro and I am editing a pdf form that I have already made. I have a drop down field with four different options (let's say 1-4). I then have a second drop down field next to it.
What I need to do is make the list of options in the second field dependent on a selection in the first drop down. (i.e. first drop down field selections are 1-4, and the Second drop down field selections are a-d, but if 3 is selected in the first drop down I want the second field options to be a-e. Hopefully that makes sense.
Thank you!
Copy link to clipboard
Copied
[I moved your question to the PDF Forms forum. The Lounge is not for technical questions.]
Yes, this can be achieved using a script. The basic format of that script would be (as the custom validation script of the first field):
if (event.value=="1") this.getField("Dropdown2").setItems(["a", "b", "c", "d"]);
else if (event.value=="2") this.getField("Dropdown2").setItems(["a", "b", "c", "d", "e"]); // etc.
else this.getField("Dropdown2").clearItems();
If you're interested in a tool that will allow you to set up such dependent drop-down fields easily, and without having to write any code, check out this one I've developed: Custom-made Adobe Scripts: Acrobat -- Create Dependent Dropdowns
Copy link to clipboard
Copied
[I moved your question to the PDF Forms forum. The Lounge is not for technical questions.]
Yes, this can be achieved using a script. The basic format of that script would be (as the custom validation script of the first field):
if (event.value=="1") this.getField("Dropdown2").setItems(["a", "b", "c", "d"]);
else if (event.value=="2") this.getField("Dropdown2").setItems(["a", "b", "c", "d", "e"]); // etc.
else this.getField("Dropdown2").clearItems();
If you're interested in a tool that will allow you to set up such dependent drop-down fields easily, and without having to write any code, check out this one I've developed: Custom-made Adobe Scripts: Acrobat -- Create Dependent Dropdowns
Copy link to clipboard
Copied
Ended up using your suggestion from another thread. Ended up with this coding that seems to work fairly well.
Thank you try67

Get ready! An upgraded Adobe Community experience is coming in January.
Learn more