I'm using laravel 5.2 and I would like to get the values for a series of checkboxes included in table. Here is the code in the view setting up the checkboxes:
<form action="" method="post">
<table class="table">
@foreach($pageWithTask as $p)
<tr><td>
</td>
</tr>
@foreach($p->task as $t)
@if($t->ended==0)
<tr class="danger">
<td></td>
<td></td>
<td><input type="checkbox" name="task[]" id="task"></td>
</tr>
@else
<tr class="success">
<td></td>
<td></td>
<td><input type="checkbox" checked="checked" class="disabled" disabled></td>
</tr>
@endif
@endforeach
@endforeach
</table>
<td><input type="checkbox" name="task[]" id="task"></td>
<input type="submit" name="save" value="Save changes" class="btn btn-facebook">
</form>
when I Debug my results in controller its show me only " save changes " , the value of my submit button thanks.
Aucun commentaire:
Enregistrer un commentaire