Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

dependent drop down menu items

wilsonl28824783
Level 1
Level 1

Is there a way to make individual values in a drop down unavailable once it is selected? 

 

Example:

  • I have 1 drop down list with names (Black Widow, Captain America, Hawkeye, Hulk, Iron Man, Thor) set on global.
  • This list shows up 5 times in 5 drop downs 
  • If 'Iron Man' is selected in the first drop down, it becomes unavailable in the following drop downs

This is just an simple example, and I know this could be done using a switch case, but in my actual requirement, I have roughly 100 items over 3 dozen drop downs, so that would not be something feasible. Is there something I can do?

 

AEM LiveCycle
1 Accepted Solution
Mayank_Gandhi
Correct answer by
Community Advisor
Community Advisor

Probably use an array of items to set dropdown. On value change set the other dropdown to (array initial - element selected in DD[*]). Call this process on every dropdown change. So you would be maintaining an initial array and a subarray of all selected elements of the dropdown.

 

@wilsonl28824783 

View solution in original post

1 Reply
Mayank_Gandhi
Correct answer by
Community Advisor
Community Advisor

Probably use an array of items to set dropdown. On value change set the other dropdown to (array initial - element selected in DD[*]). Call this process on every dropdown change. So you would be maintaining an initial array and a subarray of all selected elements of the dropdown.

 

@wilsonl28824783 

View solution in original post