Skip to main content
Participating Frequently
September 4, 2020
Question

HELP! Trying to use two drop down boxes together

  • September 4, 2020
  • 1 reply
  • 6624 views

Hi,

I am new to using adobe and I am trying to make two drop down boxes work together. What I need is for the selected item in either drop down to populate the other drop down with the corresponding selection and vice versa. I have been able to make the two separate drop down boxes and put all list items in their respective boxes, but I have no idea how to make the two correspond with eachother. Any help would be much appreciated.

Thanks!

Running Acrobat Pro DC 

This topic has been closed for replies.

1 reply

Inspiring
September 4, 2020

That doesn't sound to hard to do, but you need to be little more specific. You want it to populate or show specific selection?

Participating Frequently
September 4, 2020

I think I want it to show specific selection. I'm not exactly sure. Basically I need the item in either of the selected drop downs to correspond with one another.   I'm making a parts list, one drop down will have part numbers and the other with part descriptions.  Not all my employees will know part numbers or part descriptions but, they will know one or the other, so the drop down selections needs to link together on whatever they select.

Nesa Nurani
Community Expert
Community Expert
September 4, 2020

In 'Format' tab select 'custom' and then 'Custom format script' and use code below.
In my example if you select first option in dropdown1 it will select 3rd option in second dropdown or if you select option 2 it will select option 1 in second field. Since I don't know what options you will be linking,  you will have to adapt code to your needs.


if (!event.willCommit){
var sel = event.changeEx;
var f = this.getField("Dropdown2");

if (sel == "Selection1"){
f.value = "Selection3";}

else if (sel == "Selection2"){
f.value = "Selection1";}

}