<xmp id="km2uu"><button id="km2uu"><ins id="km2uu"></ins></button><ins id="km2uu"></ins>
<xmp id="km2uu"><form id="km2uu"></form>
<ins id="km2uu"></ins>
<xmp id="km2uu">
<xmp id="km2uu"><form id="km2uu"></form>
<form id="km2uu"></form><form id="km2uu"><button id="km2uu"><button id="km2uu"></button></button></form><ins id="km2uu"></ins>
<xmp id="km2uu"><xmp id="km2uu"><button id="km2uu"></button>
<xmp id="km2uu"><form id="km2uu"><button id="km2uu"></button></form>
<button id="km2uu"><button id="km2uu"></button></button>
<xmp id="km2uu"><form id="km2uu"><button id="km2uu"></button></form>
<xmp id="km2uu"><xmp id="km2uu"><form id="km2uu"><button id="km2uu"><button id="km2uu"></button></button></form>
<xmp id="km2uu"><form id="km2uu"></form><ins id="km2uu"><form id="km2uu"></form></ins>
<xmp id="km2uu"><form id="km2uu"><form id="km2uu"></form></form><xmp id="km2uu"><xmp id="km2uu"><form id="km2uu"><form id="km2uu"></form></form>
<xmp id="km2uu"><form id="km2uu"></form><form id="km2uu"></form><xmp id="km2uu"><form id="km2uu"><xmp id="km2uu"><xmp id="km2uu">
<button id="km2uu"><form id="km2uu"></form></button>
<xmp id="km2uu"><form id="km2uu"></form><ins id="km2uu"><form id="km2uu"><form id="km2uu"></form></form></ins><xmp id="km2uu">
鄭州優化
當前位置: 首頁 > 資訊 > 建站知識 >

增強織夢系統自定義表單強度方法(已測試)

時間:2016-09-20 15:53來源:www.mtcarmelchurch.net 作者:仿站之家 點擊:

自定義表單
本文實例講述了織夢dedecms中自定義表單必填項的設置方法。分享給大家供大家參考。具體實現方法如下:

先說下,已經試過確定有用:

1.編輯器打開\plus\diy.php

2.在文件中找到此行代碼:

$dede_fields = empty($dede_fields) ? '' : trim($dede_fields);

3.在這一行代碼之下,加入代碼,復制的話刪掉代碼中的空行.

代碼如下:

//增加必填字段判斷

if($required!=''){

if(preg_match('/,/', $required))

{

$requireds = explode(',',$required);

foreach($requireds as $field){

if($$field==''){

showMsg('帶*號的為必填內容,請正確填寫', '-1');

exit();

}

}

}else{

if($required==''){

showMsg('帶*號的為必填內容,請正確填寫', '-1');

exit();

}

}

}

//end

4.保存完成后,在表單頁面找到這行代碼:

代碼如下:<form action="/plus/diy.php" enctype="multipart/form-data" method="post">

在這行代碼之下,加入代碼:

代碼如下:<input type="hidden" name="required" value="數據字段名,數據字段名" />

注意這行代碼要修改下,根據你的表單所需要設置的必填項,例如設置“姓名”、“郵箱”為必填項.

添加新字段--“表單提示文字”:姓名--“字段名稱”:name

添加新字段--“表單提示文字”:郵箱--“字段名稱”:email

此行代碼應為:

代碼如下:<input type="hidden" name="required" value="name,email" />

這樣就把這兩個選項設置為必填項了,如果沒有填寫就提交,會打開窗口提示“帶*號的為必填內容,請正確填寫”,當然,這一句話可以改成其它的文字.
最終將所有的程序自帶生成一下之后,你可以隨意填寫一下表單信息,


【手機掃一掃,獲得更多資訊】



(責任編輯:fangzhanzhijia.com)
------分隔線----------------------------

服務流程

關于我們

關注我們

幫助中心

關注我們

  • 首頁丨建站流程丨官網定制丨網站模板丨移動網站丨企業資訊丨建站知識丨網絡營銷丨建站服務丨客戶案例丨企業中心丨聯系我們

Copyright @ 2010-2015 www.mtcarmelchurch.net 中誼科技&版權所有 網站地圖 豫ICP備14024405號-3
中誼科技專業提供網站模板,網頁模板,模板教程,網頁制作,程序插件等建站資源,我們致為于打造優秀的建站資源共享平臺!

日本高清色视频免费
<xmp id="km2uu"><button id="km2uu"><ins id="km2uu"></ins></button><ins id="km2uu"></ins>
<xmp id="km2uu"><form id="km2uu"></form>
<ins id="km2uu"></ins>
<xmp id="km2uu">
<xmp id="km2uu"><form id="km2uu"></form>
<form id="km2uu"></form><form id="km2uu"><button id="km2uu"><button id="km2uu"></button></button></form><ins id="km2uu"></ins>
<xmp id="km2uu"><xmp id="km2uu"><button id="km2uu"></button>
<xmp id="km2uu"><form id="km2uu"><button id="km2uu"></button></form>
<button id="km2uu"><button id="km2uu"></button></button>
<xmp id="km2uu"><form id="km2uu"><button id="km2uu"></button></form>
<xmp id="km2uu"><xmp id="km2uu"><form id="km2uu"><button id="km2uu"><button id="km2uu"></button></button></form>
<xmp id="km2uu"><form id="km2uu"></form><ins id="km2uu"><form id="km2uu"></form></ins>
<xmp id="km2uu"><form id="km2uu"><form id="km2uu"></form></form><xmp id="km2uu"><xmp id="km2uu"><form id="km2uu"><form id="km2uu"></form></form>
<xmp id="km2uu"><form id="km2uu"></form><form id="km2uu"></form><xmp id="km2uu"><form id="km2uu"><xmp id="km2uu"><xmp id="km2uu">
<button id="km2uu"><form id="km2uu"></form></button>
<xmp id="km2uu"><form id="km2uu"></form><ins id="km2uu"><form id="km2uu"><form id="km2uu"></form></form></ins><xmp id="km2uu">