Update one list from another
- by lacqui
I have two multi-select lists in HTML - one of categories, and another of items. What I want is that, when an item selected in the "category" list, everything in the "items" list from that category is also selected.
For example, if "Categories" contains "Animal", "Mineral", and "Vegetable", and "Items" contains "Dog", "Cat", "Monkey", "Diamond", "Granite", "Carrot", "Tomato":
If "Animal" is selected in one list, "Dog", "Cat", and "Monkey" should be selected; any other selections should remain as they are.
I'm using a Symfony PHP backend on the server, if that makes any difference