I have a list of options in the select
tag, and I want to show specific text in a input
field, depending on the option chosen in the select
field.
If the option "TRANSPARENT" or "FOSCO" is selected, the field input
"Print Orientation" will be filled with the text "INTERNAL". If the option "PEARL" or "METALLIC" is chosen, the input
will be filled with the text "EXTERNAL".
Code:
<div id="banner-message" class="span3">
<label for="substrato_imprime">Substrato (Impressão)<span class="required"></span></label>
<select class="span12" name="substrato_imprime" id="substrato_imprime" style="text-transform:uppercase" value="">
<option value="">Selecione</option>
<option value="TRANSPARENTE">TRANSPARENTE</option>
<option value="FOSCO">FOSCO</option>
<option value="PEROLA">PÉROLA</option>
<option value="METALIZADO">METALIZADO</option>
</select>
</div>
<div class="span3">
<label for="camada">Orientação da Impressão<span class="required"></span></label>
<input class="span12" name="camada" id="camada" style="text-transform:uppercase" value="" >
</div>