Copy link to clipboard
Copied
I need some help. I have NO javascript experience and everything that it's in my form so far i've found on the internet. Here's the situation...there's two drop down menus. the first drop down menu has I, II, III as choices. The next dropdown has 1, 2, and NA as choices. I need a script that allows for the user to select from dropdown one either I or II and then auto populate NA in the next dropdown (refusing to select the other two choices). If the user selects III in the first dropdown, i need the script to allow the user to select 1 or 2 in the next dropdown but NOT NA. Make sense? I'm just trying to make the form idiot-proof for the masses, ya know?
I'd really appreciate any help at all. Also, if you know of any materials that could help me learn this stuff for Acrobat, i'd appreciate it. This is a pretty powerful program and could see it becoming very valuable.
BTW, i'm using Acrobat XI Pro
Message was edited by: MICHAEL FRARACCIO
Use this code as the first field's custom validation script (make sure to tick the option to commit the selected value immediately, under Properties - Options):
if (event.value=="I" || event.value=="II") this.getField("Dropdown2").setItems(["N/A"]);
else if (event.value=="III") this.getField("Dropdown2").setItems(["1", "2"]);
else this.getField("Dropdown2").clearItems();
Copy link to clipboard
Copied
Use this code as the first field's custom validation script (make sure to tick the option to commit the selected value immediately, under Properties - Options):
if (event.value=="I" || event.value=="II") this.getField("Dropdown2").setItems(["N/A"]);
else if (event.value=="III") this.getField("Dropdown2").setItems(["1", "2"]);
else this.getField("Dropdown2").clearItems();
Copy link to clipboard
Copied
That worked perfectly! Thanks so much!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now