How do I HIDE 2 dropdown boxes based upon another dropdown box selected option?

DropdownBox1 has an option called "NONE".

How can I hide DropdownBox2 and DropdownBox3 when the DropdownBox1 "NONE" option is selected?

John Forest

Voted Best Answer

You can do this via a custom validation script for the first dropdown control. Use this script:

var f1 = this.getField("DropdownBox2");
var f2 = this.getField("DropdownBox3");
if (event.value == "NONE") {
    f1.display = display.hidden;
    f2.display = display.hidden;
else {
    f1.display = display.visible;
    f2.display = display.visible;

Also, make sure that you've selected to commit the values immediately on the "Options" tab on the DropdownBox1 field properties dialog.

Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...

By Karl Heinz Kremer   

Please specify a reason: