想要为cake php中的每个复选框添加href链接

时间:2016-05-09 09:40:47

标签: php cakephp model-view-controller croogo

 echo $this->Form->input('name_group', array('multiple' => 'checkbox', 'options' => $val,'label' => false,'class' => 'col-lg-4 col-md-4 col-sm-4 col-xs-6 custom_no_padding custom_checkbox','selected' => $selected));

并希望输出如下:

<div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 custom_no_padding custom_checkbox">
<input type="checkbox">
<label><a href="test1">Value1</label>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 custom_no_padding custom_checkbox">
<input type="checkbox"><label><a href="test2">Value2</label>
</div>

0 个答案:

没有答案