2 回答
TA贡献1886条经验 获得超2个赞
您只需要为每个输入添加一个 value 属性来表示准确检查的内容。
<td>
<div class="custom-control custom-radio radio-primary">
<input type="radio" id="rdo_{{$key}}_pre" name="rdo[{{$s->id}}]" class="custom-control-input" value="present" checked>
<label class="custom-control-label" for="rdo_{{$key}}_pre">Present</label>
</div>
<div class="custom-control custom-radio radio-pink">
<input type="radio" id="rdo_{{$key}}_abs" name="rdo[{{$s->id}}]" class="custom-control-input" value="absent">
<label class="custom-control-label" for="rdo_{{$key}}_abs">Absent</label>
</div>
</td>
TA贡献1946条经验 获得超3个赞
尝试更改foreach($request->input('chk', []) as $key => $chk)
为foreach($request->input('rdo') as $key => $chk)
?
- 2 回答
- 0 关注
- 147 浏览
添加回答
举报