获取所有选定复选框symfony2的值
您需要将名称更改为checkboxD[]。 我希望这对你有帮助获取所有选定复选框symfony2的值,symfony,symfony-2.6,Symfony,Symfony 2.6,您需要将名称更改为checkboxD[]。 我希望这对你有帮助 <th scope="col">{{ d.id }} <input type="checkbox" value="{{ d.id }}" name="checkboxD" class="checker"></th> public function traiterAction() { $IDs = array(); if ( $thi
<th scope="col">{{ d.id }} <input type="checkbox" value="{{ d.id }}" name="checkboxD" class="checker"></th>
public function traiterAction() {
$IDs = array();
if ( $this->getRequest()->isMethod('POST') ) {
$IDs = $this->getRequest()->get('checkboxD');
}
return $this->render('@EgovPoste/test.html.twig',array('ids'=>$IDs));
}