3
Hello, I have a question in my code. I need that when clicking a Select is displayed fields for entries. For example:
<form role="form" class="form-horizontal">
<div class="form-group">
<label class="col-md-3 control-label">Produto</label>
<div class="col-md-3">
<select class="form-control select" name="tipo">
<option>Carro</option>
<option>Moto</option>
<option>Jetski</option>
<option>Barco</option>
</select>
</div>
</div>
When selecting Car, for example, open these fields:
<div class="col-md-6" nome"carro">
<div class="block">
<h4>Opcionais</h4>
<div class="panel panel-default">
<div class="panel-body">
<div class="form-group">
<div class="col-md-4">
<label class="check"><input type="checkbox" name="airbag" class="icheckbox"/> Airbag</label>
</div>
<div class="col-md-4">
<label class="check"><input type="checkbox" name="freio_a_disco" class="icheckbox"/> Freio a disco</label>
</div>
<div class="col-md-4">
<label class="check"><input type="checkbox" name="abs" class="icheckbox"/> ABS</label>
</div>
<div class="col-md-4">
<label class="check"><input type="checkbox" name="cambio_manual" class="icheckbox"/> Câmbio manual</label>
</div>
<div class="col-md-4">
<label class="check"><input type="checkbox" name="cambio_automatico" class="icheckbox"/> Câmbio automático</label>
</div>
</div>
</div>
</div>
</div>
I will do the Checkbox fields for each Type (select category), for bikes, houses, cars, etc. My question is how I insert the whole set by clicking on Select.
Did my answer help you? If so, mark it as accepted :)
– Diego
Hello Diego, It worked, thank you very much!
– Alexandre
Then you can accept my answer below :)
– Diego