0
I have a registration form where I reset the fields when entering a record with the following:
document.getElementById(id).reset(); //Aqui passo o id do formulário
The problem is I have a field now Select2 and a multiselect that are not being reset.
<select name="funcao_id" class="form-control select2">
...
<option>...</option>
...
</select>
<select multiple id="exames" name="exames[]" class="form-control">
...
<option>...</option>
...
</select>
<script>
$(function () { $(".select2").select2(); });
</script>
I put only the relevant parts of the code, in case I need something else.