Copy link to clipboard
Copied
I am trying to create a fillable form for a clothing order for our company. I want to have a drop down list of our clothing options to order ( Sweatshirt, Tshirt,etc.). Some shirts have different sizes available so I would like for when they select their option in the first drop down list, that the second drop down would populate just the sizes available for that clothing option. Is this even possible?
Disclaimer- I'm very new to Adobe, so I need a lot of help and dumbing down of answers- Thanks! 🙂
Copy link to clipboard
Copied
Hi,
This is fairly easy to do, if you place a script similar to this on the validate (validate, see image below) of the first drop down ( the Sweatshirt. tshirt) one, and make sure the name in the getField method is the size drop you want. Then code like this should work.
var otherDD = this.getField("Dropdown2"); // change to match name of your size dropdown.
console.println ( event.value);
if (event.value == "T-Shirt") {
otherDD.clearItems();
otherDD.insertItemAt("Small");
otherDD.insertItemAt("Medium");
} else if ( event.value == "Sweatshirt"){
otherDD.clearItems();
otherDD.insertItemAt("Medium");
otherDD.insertItemAt("Large");
}
You also want to make sure the option for "Commit Selected value immediately" is checked on the properties dialog
Hope this helps
Malcolm