Copy link to clipboard
Copied
I'm seeking assistance on how to get the dropdown menu item options to only be present for certain selection from another field.
If Seperation Type is Voluntary, then the Details menu shows these value from the Item List
If Seperation type is Involuntary, then the Details menu shows these Items
Copy link to clipboard
Copied
Hi,
This has been answered before with different methods using Acrobat JavaScript in these forums.
If I understood correctly you need the user to interact with the "SEPARATION TYPE" dropdown menu. And based on the selection that the user selects another dependent dropdown menu will populate a specific list of items.
If you are new to Acrobat JavaScript you can try my example below, which employs a Custom Keystroke script.
In my opinion is the simplest method I could find (but it is worth noting that it is not as elegant as other more advanced scripts that I've seen around).
But anyway, I am executing the custom keystroke script from the "SEPARATION TYPE" dropdown menu:
if(event.willCommit) {
if(event.value =="VOLUNTARY") {
this.getField("Dropdown2").setItems(["<SELECT ONE>",
"FAM-PERSONAL/FAMILY",
"HEA-HEALTH/MEDICAL",
"TRA-TRANSPORTATION ISSUES"
]);
} else {
if(event.value =="INVOLUNTARY") {
this.getField("Dropdown2").setItems(["<SELECT ONE>",
"ATT-ATTENDANCE",
"IMP-IMPROPER W/GUEST",
"FCE-FAILED EMP.CONDITIONS",
"FAL-FALSIFICATION OF DOCS",
"RLS-REV/SUP OF GAMING LICENSE"
])
} else {
if(event.value =="<SELECT ONE>") {this.getField("Dropdown2").setItems(["<SELECT ONE>"])}
}
}
}
NOTE:
You make copy the script, go to the Format tab select "Custom Keystroke Script" and paste it in the JavaScript editor for that section.
Additionally, go to the "Options" tab and ensure that the tick box "Commit selected value immediately" is checked in both dropdown menu fields.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now