在PHP类库中有一个类库叫form builder,如果你熟悉form builder的使用方法,那么微擎中万能表单你也会得心应手。微擎代码虽然写的很乱,但是集成了很多用起来很爽的东西。
一、后端:
- load()->func('tpl');
二、前端:
- <ul class="we7-page-tab">
- <li class="active"><a href="{php echo url('module/manage-account/setting',['m'=>'yoby_test1']);}">参数设置</a></li>
- </ul>
- <div class="content">
- <form action="" method="post" class="we7-form" role="form" id="form1">
- <div class="panel">
- <div class="panel-body">
- </div></div>
- </form>
- {php we7_text('openid','openid',$settings['openid'],'openid在粉丝信息里面找')}
- {php we7_texts('openid','openid9','89','openid在粉丝信息里面找')}
- {php we7_editor('openid','openid99','99','openid在粉丝信息里面找')}
- {php we7_select("选择","select",["1"=>"中国","2"=>"美国","日本"],"3","选择国家")}
- {php we7_image($text="缩略图",$name="thumb",$value='1.jpg',$desc='选择你的图片')}
- {php we7_isshow($text="是否显示",$name="isshow",$arr=[0=>'不显示',1=>'显示'],$value=0,$desc='显示选项')}
- {php we7_images($text="缩略图",$name="tupian[]",$value=[],$desc='选择你的图片')}
- {php we7_color("选择颜色","idsx")}
- {php we7_date("选择日期时间")}
- {php we7_emoji("选择表情","emoji",$value="")}
- {php we7_icon("icon","icon")}
- {php we7_audio("音乐上传","music",'',"选择音乐")}
- {php we7_video("视频上传","video",'',"只能是mp4或flv")}
- {php we7_copy("复制","abc")}
- {php we7_dates("时间段","gametime")}
- {php we7_birthday()}
- {php we7_map()}
- {php we7_del()}
- {php we7_city("省市县","ssx","湖南省")}
- {php we7_checkbox("复选",'chk',["a"=>'男','b'=>"女","c"=>"未知"],"b","选择性别")}
- {php we7_radio("单选",'rad',["a"=>'男','b'=>"女","c"=>"未知"],"a","选择性别")}
- {php we7_edit("编辑")}
- {php we7_btn('保存')}
三、搜索表单直接用不能再form里面
- {php we7_search("关键字","k","中国",'')}