开发者

How to add a select all checkbox

I have this line:

echo $form->input('management_categories',array('options' => $instrumentCategoriesManagement,'type' =&开发者_Go百科gt; 'select','multiple' => 'checkbox','selected' => $management_categories));

How can I add an additional checkbox that says "Select all" at the beginning?

Thanks in advance


I don't know if it works for checkbox:

echo $form->input('management_categories',array('options' => $instrumentCategoriesManagement,'type' => 'select','multiple' => 'checkbox','selected' => $management_categories,'empty'=>'Select all'));

To actually achieve the effect, you'll need to write js code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜