Skip to main content
Participant
October 28, 2020
Question

PDF Form Dependent Dropdown Menus

  • October 28, 2020
  • 4 replies
  • 8870 views

Hi everyone, 
I am using Adobe Acrobat Pro 2017 to prepare a form. I have created two drop down menu's, but I am trying to autopopulate the second drop down menu depending from the selections made in the first drop down menu. The first drop down menu is named "Part1" and the second drop down menu is named "Description1." The first drop down menu would have codes that relate to different parts. I would like the second drop down menu to generate a description depending on the code selected from the first drop down menu. For example, If I select "1111" in the first drop down menu I would like for "thermister" to appear on the second drop down. Does anyone know if this is possible to do? 

This topic has been closed for replies.

4 replies

Thom Parker
Community Expert
Community Expert
October 30, 2020

From your description it does not sound like you really need a second dropdown. I would go with the suggestion from try67 and use a text box. Here is an article on scripting this type of arrangement:

https://acrobatusers.com/tutorials/change_another_field/

 

However, if you want to have two synchronized lists, where the user can select from ethier, and the other will change accordingly, then this is possible as well by using the same technique explained in the article above, but with some twists. 

 

You can read more about list handling here:

https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm

https://acrobatusers.com/tutorials/js_list_combo_livecycle/

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Meenakshi_Negi
Legend
October 30, 2020

Hey,

 

Thank you for reaching out.

 

As per your description above, you are trying to create a dropdown that auto-populates the menu depending on the selection made in the first dropdown. There is no direct option to achieve this in Acrobat. However, you may use a script to achieve this workflow.

You may refer to the suggestions provided in the following community thread with similar discussion: https://community.adobe.com/t5/acrobat/how-to-populate-drop-down-list-based-on-multiple-text-box-entries/td-p/10363227?page=1

Check if that helps.

 

Thanks,

Meenakshi

 

try67
Community Expert
Community Expert
October 29, 2020

The second field should be a text field, unless you want the user to be able to select from multiple descriptions for each product (which I don't think you do). Do that and then you'll be able to use a simple calculation script to populate it based on the value of the Part1 field. Something like this:

var p = this.getField("Part1").valueAsString;

if (p=="1111") event.value = "thermister";

else if (p=="2222") event.value = "misterthe"; // etc.

else event.value = "";

 

wellingtonr82785789
Participant
November 6, 2022

Thank you for the response. I am in need of assistance with the same. I tried the method you suggested and it works but I need it for multiple options based on the selection. 

 

My form is for departments and sections of the organization I work for. 

i.e.

Headquarters (Department followed by sections)

- Accounts

- Public Relations

- Information Technology 

 

Administration (Department followed by sections)

- Human Resources

- Personal Files Office

- Registry 

try67
Community Expert
Community Expert
November 6, 2022

How is that different from the example given above?

Bernd Alheit
Community Expert
Community Expert
October 29, 2020

Post the question in the forum for Adobe Acrobat.