Copy link to clipboard
Copied
Hello,
Here's what I'm trying to do:
Selecting the item# from a dropdown generates a list of ingredients for that item in another dropdown. The selected ingredient from the "Ingredient" dropdown will then be added to the "Order" list box. The goal is to be able to select ingredients in the order they were used. I'm close, I've got the code pretty much worked out.
Here's my code:
For "Item" drop down custom validation script to "Ingredient" list box-
switch (event.value) {
case " ":
this.getField("Ingredient").setItems([" "]);
break;
case "Item1":
this.getField("Ingredient").addItems(["ing1","ing2"]);
break;
case "Item2":
this.getField("Ingredient").addItems(["ing3","ing2"]);
break;
}
The issue is "ing1" is being automatically selected and transferred to the "Order" list and I want to have to select each one manually.
Thank you in advance for the assistance!
That's how it works. The first item in the list is the default item.
Copy link to clipboard
Copied
There's no such method called "addItems". Use setItems.
Copy link to clipboard
Copied
Oh right, thank you. The issue of the first item being automatically selected remains however.
Copy link to clipboard
Copied
That's how it works. The first item in the list is the default item.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now