【发布时间】:2017-09-16 03:24:13
【问题描述】:
您好,这是一种候选人形式,每行都包含一个复选框。从这些复选框中,我最多可以选择四个。如何一次将这四个作为数组发送并将它们插入到“候选人”表的不同四行中?任何帮助是极大的赞赏。谢谢。
<form id="cforms" method="post">
{{ csrf_field() }}
@unless($cforms->count())
<h1>There are no forms submitted yet!</h1>
@else
<table>
<thead>
<th font-weight="bold"> Select</th>
<th font-weight="bold"> Student-ID</th>
</thead>
@foreach($cforms as $candidates)
<tr>
<td>
<input type="checkbox" id="checkbox" name="Candidates_ID" value=
"{{$candidates->s_id}}">
</td>
<td>{{$candidates->s_id}}</td>
</tr>
@endforeach
</table></br>
@endunless
</form>
【问题讨论】:
标签: javascript php mysql laravel-5.3