Is there any way to send multiple checkbox values including unchecked checkbox values. For example, if I have 4 checkboxes and user checks first and last checkboxes, I want to get the params something look like vehicle=> ["1", "0", "0", "1"]
. Any help?
<input type="checkbox" name="vehicle[]">
<input type="checkbox" name="vehicle[]">
<input type="checkbox" name="vehicle[]">
<input type="checkbox" name="vehicle[]">
Aucun commentaire:
Enregistrer un commentaire