Good afternoon everyone.
I need guidance from you regarding select multiple.
I have the select below:
<select class="form-control" id="dias_semana" multiple name="diasDaSemana[]" required>
<option value="">Selecione...</option>
<option value="Domingo">Domingo</option>
<option value="Segunda">Segunda-Feira</option>
<option value="Terca">Terça-Feira</option>
<option value="Quarta">Quarta-Feira</option>
<option value="Quinta">Quinta-Feira</option>
<option value="Sexta">Sexta-Feira</option>
<option value="Sabado">Sábado</option>
</select>
Through the above select I am able to select more than one option and send it to the bank.
My difficulty is to display the data that is in the database.
I was trying to do this:
$("#dias_semana").val(diasDaSemana[]);
But it did not work. How can I do this?