Is there a easy way to have something like 3 select boxes where the previous one sets the options for the next one
like if the first select is [clothing, food, countries]
choosing food, will have in the 2nd select [cheese, meat, fruits]
and choosing fruits will have the last select as [apples, bananas, oranges]
also need to take into account that select data could be dynamic and comes from a server (before or during the selection)
the ways I thought of doing this are:
get all the data upfront, in some kind of json or other structure, and everytime a select is chosen, take the corresponding data. This could work for static data, but not for ajaxed data
everytime a select is chosen, get the data for its value. This could work but also requires manual js handling
Is there an easier way to do this?