dependent drop down menu items

Avatar

Avatar

wilsonl28824783

Avatar

wilsonl28824783

wilsonl28824783

19-05-2020

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

20-05-2020

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 

Answers (0)