form表单项是Widget中的核心部分,YFCMF内置了几十种常用的表单,通过传递简单的参数,可以达到快速创建form和table的管理页面,真正释放开发者的双手,将更多的精力放到功能的设计与开发上面。

序号 表单项 调用
1 按钮 addButton($title='',$attr=[],$id='',$type='')
2 下拉按钮 addButtondropdown($button=[],$groups=[],$has_drbtn=false,$class='',$dr_class='')
3 按钮组 addButtongroup($groups=[],$class='')
4 验证码 addCaptcha($name, $id = '', $title = '', $attr = [], $extra_attr_input = '', $extra_class_input = 'col-xs-10 col-sm-5', $extra_css_input = '', $extra_attr_img = '', $extra_class_img = 'col-xs-10 col-sm-3', $extra_css_img = 'cursor: pointer;border: 1px solid #d5d5d5;height:34px;margin-left:10px;')
5 复选框 addCheckbox($name,$title,$options=[],$default='',$disabled =[],$attr=[],$extra_class='',$extra_attr='')
6 颜色选择框 addColor($name,$title,$default='',$help_text='',$format='hex',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
7 日期框 addDate($name,$title,$default='',$help_text='',$format='yyyy-mm-dd',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
8 日期区间 addDaterange($name,$title,$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
9 日期时间 addDatetime($name,$title,$default='',$help_text='',$format='yyyy-mm-dd hh:ii:ss',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
10 单文件上传 addFile($name='',$title='',$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5')
11 多文件上传 addFiles($name='',$title='',$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5')
12 tab分组 addGroup($groups=[],$id='',$position='',$color='',$tab_space=0,$tab_padding=0,$content_padding=0,$content_noborder=false)
13 图标选择 addIcon($name,$title,$default='0',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
14 单图片上传 addImage($name='',$title='',$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5')
15 多图片上传 addImages($name='',$title='',$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5')
16 图片剪裁 addJcrop($name='',$title='',$default='',$attr=[],$extra_class='col-xs-10 col-sm-5')
17 多级联动 addLinkage($title='',$data=[],$attr=[])
18 格式文本 addMask($name,$title,$default='',$help_text='',$format='',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
19 单选表单 addRadio($name,$title,$options=[],$default='',$disabled=[],$attr=[],$extra_class='',$extra_attr='')
20 范围 addRange($name,$title,$default='0',$help_text='',$attr=[],$extra_class='',$extra_attr='')
21 单选下拉框 addSelect($name,$title,$options=[],$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
22 多选下拉框 addSelects($name,$title,$options=[],$default='',$help_text='',$extra_attr='',$optgroups=[],$attr=[],$extra_class='')
23 开关 addSwitch($name,$title,$default='0',$extra_attr='',$attr=[],$extra_class='')
24 表格 addTable($fields,$pk='id',$datas=[],$right_actions=[],$page='',$order=false,$delall=false,ajax=false)
25 tag标签 addTag($name,$title,$data=[],$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
26 单行文本框 addText($name,$title,$default='',$help_text='',$extra_attr='',$type='text',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_css='')
27 多行文本框 addTextarea($name,$title,$default='',$help_text='',$extra_attr='',$attr=[],$extra_class='col-xs-10 col-sm-5')
28 时间框 addTime($name,$title,$default='',$help_text='',$attr=[],$extra_class='col-xs-10 col-sm-5',$extra_attr='')
29 百度编辑器 addUeditor($name='',$title='',$default='',$help_text='',$attr=[],$extra_class='col-xs-12')
30 表格顶部按钮搜索 addToparea($default=[],$custom=[],$items=[],$form=[])

其它表单会陆续增加...