I am having trouble wrapping my head around how to implement dependent dropdown boxes - any help would be great!
If I was to have say, 3 or 4 dependent dropdown boxes, all of which depend on one-another in a cascaded fashion:
Dropdown1 > Dropdown2 > Dropdown3 > Dropdown4
I have it working so that each dropdown calls a method via ajax and updates the following dropdown as outlined in the appropriate wiki article however I am having issues with figuring out how to implement the following:
Having a default “All” option in Dropdowns 2, 3 and 4 - Is this something where I’d have to manually add a single option prior to populating the contents and have a corresponding check in the controller for a custom value?
Say you’ve selected values in Dropdowns 1, 2, and 3 and the dependent dropdowns are updating as expected, and now you go back and change Dropdown 2, dropdowns 3 and 4 will need to be updated. How do you reset the child dropdowns when changing the parent one?
Hopefully this is easy enough to understand.
Thanks in advance!