Skip to main content
maureenw29900
Participant
May 16, 2017
Question

How can you make Conditional Drop Downs in a PDF Form?

  • May 16, 2017
  • 2 replies
  • 2213 views

Could someone please explain to me how to make a conditional drop down on a PDF form?  For example if I have more than one categories like Fruit, Vegetables and then I would like the subsequent field to only show the options that fall within the previous fields options like Apple, Banana, Pear, Pineapple if you choose Fruit and Celery, Carrot, Beet, Pea if you choose Vegetable.  Is this possible?

This topic has been closed for replies.

2 replies

Inspiring
June 10, 2020

I use something like this as a validation script under the dropdown that has the Fruit, Vegetables, etc. options that will populate the option list in another dropdown,  I call it Specifics below:

 

switch (event.value) {
case "Fruit":
this.getField("Specific").setItems(["Apple","Bannana","Pear"]);
case "Vegetable":
this.getField("Specific").setItems(["Celery","Carrrot","Beet"]);

}

try67
Community Expert
Community Expert
May 16, 2017

Yes, it is. You would basically use the validation (or keystroke) event of the "parent" dropdown to populate the values of the "child" ones, using the setItems method.

I've developed several tools that allow you to set up such behavior:

Custom-made Adobe Scripts: Acrobat -- Populate Fields From Dropdown (populate non-dropdown fields with values based on a selection in a dropdown)

Custom-made Adobe Scripts: Acrobat -- Create Dependent Dropdowns  (populate a "dependent" dropdown field based on the selection in the "master" dropdown, pretty much what you described above)

Custom-made Adobe Scripts: Acrobat -- Create Cascading Dropdowns (create a set of "cascading" dropdowns, each one populating the next one based on their selection, with the data coming from a spreadsheet)