How to handle conditional dropdown lists
My form has two fields.
The first one is a dropdown list displaying a list of categories, and the second one is a data list that displays a list of users. The data list options depend on the category selected in the dropdown list.
E.g.:
- User selects category A, data list shows options 1-2-3,
- User selects category B, data list shows options 4-5-6.
Here are the questions:
Should I disable the data list until a category has been selected in the dropdown list?
What should happen if the user changes the category after selecting an option in the data list?
- Should the option in the data list be removed from the field?
- Should the field be in an error state?