0
Hello!
I have two combos, a category other type of category! both are already filled with values from the database! I would like that when selecting category, the category type combo only list the category type values of the selected category without using ajax for search and filter! as it comes all filled a way to do via javascript even to filter this data! is possible?
Example: Combo Categoria:
<select name="cat" id="cat">
<option value="">Todas as Categorias</option>
<option value='11'>Delivery</option>
<option value='10'>Gastronomia</option>
</select>
Combo Tipo de Categoria ( lista todos os tipos)
<select name="tcat" id="tcat">
<option value="">Todas as Categorias</option>
<option value='11'>Comida de Buteco</option>
<option value='10'>Francesa</option>
<option value='12'>Comida de Buteco</option>
<option value='14'>Comida Saudavel</option>
<option value='15'>Chinesa</option>
<option value='19'>Pizzaria</option>
</select>
When selecting the category, display the related category results in the category type combo without using ajax
Yes, but we need the code and a [mcve], preferably.
– Woss
@Andersoncarloswoss set the example.
– lelopes
And how do you differentiate what is "Delivery" or "Gastronomy"?
– Woss
@Andersoncarloswoss I haven’t done the listing, but in the database it’s all related! I asked a way to do this without using ajaxa, if you have to put an attribute in the category type stating which category belongs, you can put, but now how to list the type according to the selected category without using ajax I would like to know
– lelopes