jeudi 20 octobre 2022

The update does not return the selected checkbox

I'm having an error updating the checkbox when I return to the view containing it; in particular it always returns me the first checked checkbox but not the values selected before the update.

Can anyone help me to solve this problem?

<div class="mb-3">
  <div for="treatment" class="form-label">All treatments</div>
  @foreach ($treatments as $treatment)
      <input type="checkbox" id="" name="treatments[]" value="" >
      <label for=""> </label><br>
  @endforeach
</div>



Aucun commentaire:

Enregistrer un commentaire