2
Colleagues.
I have a combobox that has the relationship of hotels:
<select name="Hotel" id="Hotel" class="form-control">
<option value="Selecione">Hotel</option>
<option value="Hotel A">Hotel A</option>
<option value="Hotel B">Hotel B</option>
<option value="Hotel C">Hotel C</option>
</select>
Only that each hotel will have the relationship of the accommodations with their respective values that is in another combobox. See:
<select name="Acomodacao" id="Acomodacao" class="form-control">
<option value="Selecione">Acomodação</option>
<option value="SGL">Single Valor X</option>
<option value="DBL">Duplo Valor X</option>
<option value="TPL">Triplo Valor X</option>
<option value="QDL">Quadruplo Valor X</option>
<option value="QTP">Quintuplo Valor X</option>
</select>
How would I make it so that when selecting a hotel, the accommodation for it automatically appears on the other combobox?
Have this registered in any database? Take a look here: Fill combobox with ajax
– KaduAmaral
Hi Cadu. He’s not coming from the comic.
– user24136
Where you store the relative information of which Hotel has which Accommodation?
– KaduAmaral
Free text. It does not come straight from the database because it is fixed information. It is in the HTML itself
– user24136
Puts the part that you refer the hotel to accommodation, or is that part that you are in doubt?
– henriquedpereira
Could you update your question with a sample of this "free text"? In this case it is interesting to work with JSON.
– Tobias Mesquita