方法:
~~~
tpl_form_check($name, $title, $value = [], $help_text = '',extra_style='')
~~~
参数描述:
| 参数 | 名称 | 变量类型 |
| --- | --- | --- |
| name | 表单name值 | string |
| title | 表单描述 | string |
| value | 默认值 | array |
| default | 默认值 | string |
| help\_text | 帮助文本 | string |
|extra_style| 复选框风格 | string |
代码示例:
~~~
<?php echo tpl_form_check('like','复选框',[
['name' => 'write','check' => 1,'title' => '温州'],
['name' => 'read','check' => 0,'title' => '福州'],
['name' => 'dai','check' => 1,'title' => '杭州']
]); ?>
~~~
效果图:
![](https://git.kancloud.cn/repos/caike_/wq_frame/raw/b46bdc3ca04f2c2d269b313cae88d5a7ca837c14/images/%E5%A4%8D%E9%80%89%E6%A1%86.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODc0MDg0NTIsImlhdCI6MTU4NzM2NTI1MiwicmVwb3NpdG9yeSI6ImNhaWtlX1wvd3FfZnJhbWUiLCJ1c2VyIjp7InVzZXJuYW1lIjoieWhsMTgiLCJuYW1lIjoiTXJZZTU4NjkiLCJlbWFpbCI6IjU1NTg1MTkwQHFxLmNvbSIsInRva2VuIjoiNzE1MTdkYjM3ODBkMjIwNjI3NTk5ZTIzNGU0YThmOTYiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.J8UpRlTnE5Y5M6P7EkjuqpLGrCv3SEJs3zdcT_SFAGw)