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

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

New Here ,
May 16, 2017 May 16, 2017

Copy link to clipboard

Copied

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?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.7K

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
Community Expert ,
May 16, 2017 May 16, 2017

Copy link to clipboard

Copied

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)

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
Explorer ,
Jun 10, 2020 Jun 10, 2020

Copy link to clipboard

Copied

LATEST

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"]);

}

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