Is there a way to change a secondary set of options based upon a prior select?
Is there a way to change a secondary set of options based upon a prior select?
rmeetin
Posts: 100Questions: 24Answers: 1
Let's say that you're building some sort of problem tree. You provide the administrator with a select option:
- Animals
- Vegetables
- Minerals
If he/she selects animals the editor form reveals options related to Animals:
- hemisphere
- habitat
- color
- endangered
Vegetables:
- color
- carbohydrates
- vitamins
- child-friendly
Minerals
- rare
- precious
- mallable
Is this possible with DTE? If yes can you point me to an example?
This discussion has been closed.
Answers
I'm sorry, but I'm not clear how this relates to DataTables? Are you referring to some method to filter the table?
Colin
In datatables editor you offer select for choosing items from a list. You want the form to be smart and concise. The user/administrator chooses animals from the select.
Rather than displaying/offering options relevant to all 3 including vegetables and minerals, once animals is selected it will only display the next select that sisters with animals:
This helps keep the form shorter and reduces confusion. This is somewhat similar to choosing countries, then drawing in from the regions relevant to the selected country.
You could use
dependent
for that, something like this example here. Or possibly achange
event as discussed in this thread - see Allan's answer towards the end,Colin