1.自定义表单表明不同活动时,只需要让form表单进入循环调取标题即可。
注:有时不能用。注意value值。可现在默认的模板中查看源代码。
2.自定义表单必填项功能。添加跳转页面。
1.html中增加
<input type="hidden" name="required" value="name,tel,huodong" />
2.找到文件plus,然后在plus/diy.php文件中的第40行左右找到
$dede_fields = empty($dede_fields) ? '' : trim($dede_fields);后添加如下代码:
//增加必填字段判断
if($required!=''){if(preg_match('/,/', $required)){$requireds = explode(',',$required);foreach($requireds as $field){if($$field==''){showMsg('带*号的为必填内容,请正确填写', '-1');exit();}}}else{if($required==''){showMsg('带*号的为必填内容,请正确填写', '-1');exit();}}}
//页面跳转前一页
/plus/diy.php
//showmsg($bkmsg, $goto);
showmsg($bkmsg, -1);