Example of the first box:
<h5>Filtrar por Marcas</h5>
<select name="filtrar_marca">
{% for category in categories %}
<option value="{{ category.name }}">{{ category.name }}</option>
{% endfor %}
</select>
Exemplo de resultado: Filtrar por Marcas BMW HONDA
I need two more functions, where after selecting the first filter it displays the next box with the subcategories of those models and lastly after selecting the model it displays the last box with the years.
<h5>Filtrar por Modelos</h5>
<select name="filtrar_modelo">
<option value=""></option>
</select>
<h5>Filtrar por Ano</h5>
<select name="filtrar_ano">
<option value=""></option>
</select>
Reference link