I have a form, and when I click "Redo Search" I want it to clear all fields.
HTML?
<form action="" class="">
<ul class="dropdown">
<li>
<input type="checkbox" <?php echo (in_array($dadosSegmentos->idAdicional, $_GET['segmentos'])) ? 'checked' : ''; ?> id="<?php echo $dadosSegmentos->descricao; ?>" name="segmentos[]" value="<?php echo $dadosSegmentos->idAdicional; ?>" />
<label for="<?php echo $dadosSegmentos->descricao; ?>"><?php echo $dadosSegmentos->descricao; ?></label>
</li>
</ul>
<select class="estados" name="estado">
<option value="">UF</option>
<option value="">UF1</option>
<option value="">UF2</option>
<option value="">UF3</option>
<option value="bla"></option>
</select>
<input class="formInputBusca grid_150" placeholder="Informe a cidade" value="<?php echo ($_GET['cidade']!='' && $_GET['cidade']!='Informe a cidade') ? $_GET['cidade'] : 'Informe a cidade'; ?>" name="cidade" type="text" />
<input type="reset" class="buscaAvancadaRefazer f-left margin-top-20" value="Refazer Busca" />
<input type="submit" value="" class="buscaAvancadaBt f-right margin-top-20 cp" />
</form>
I used type="reset"
, but it clears the inputs.
in select, I would like it to let selected the first <option>
, how? when the guy has to redo the search he clears the input
and changes to the first option
giving the impression of a new search.