Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Dependent dropdown lists in Acrobat

$
0
0

Hi,

 

I am a first time poster and was looking for help with some scripting in a PDF form I have created.

 

I am basically looking to have a second dropdown list dependant on the value of the first but I'm not having any success.

 

I have tried the following as a calculation and as a MouseUp Javascript action but to no avail.

 

Basically, I'm looking for the following: If a user selects a School/Unit called Registry in dropdown 1, it will populate with 4 or 5 locations in dropdown 2. I need to do this for about 20 units. I think I'll be ok once I get one unit working but I can't get to that stage

 


// clear the dropdown displayed value and items
this.Value = null;
this.clearItems();


// repopulate the items based on the checkboxes
if(this.getField("School/Unit").Value == "Registry")
{
     this.addItem("Location 1");     this.addItem("Location 2");     this.addItem("Location 3");     this.addItem("Location 4");     this.addItem("Location 5");

}

Can anybody help me please?

 

Many thanks

Scott


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>