今天給大家講解一下帝國(guó)CMS7.5的用戶提交表單,比如在線報(bào)名、反饋信息、留言等,可以幫助我們獲得用戶的信息,從而帶來(lái)業(yè)務(wù),實(shí)現(xiàn)方法如下:
制作出來(lái)的效果如下:
方法步驟:
1、點(diǎn)擊菜單欄的【插件】選項(xiàng),然后再選擇【信息反饋管理】中的【管理反饋分類】選項(xiàng),在右側(cè)點(diǎn)擊【增加反饋分類】即可;注意,如果不增加,直接用默認(rèn)系統(tǒng)的默認(rèn)即可,理論上講信息反饋分類是可以添加無(wú)數(shù)個(gè)的。
2、進(jìn)入【增加反饋分類】頁(yè)面,填寫【分類名稱】,勾選需要的表單選項(xiàng),也可以在【字段管理】里面【新建字段】,然后提交即可;
3、將代碼添加到需要表單的地方,在代碼復(fù)制中需要替換的主要有以下兩點(diǎn)需要特別注意:
<form name='feedback' method='post' enctype='multipart/form-data' action='[!--news.url--]e/enews/index.php'>
<input type=hidden name=bid value=2>
<input type="hidden" name="ecmsfrom" value="url ">
<input name='enews' type='hidden' value='AddFeedback'>
在上面的代碼中需要注意action的值以及添加value提交值,其中value=?是表單的ID;value="url "中url可以填寫“/”也可以填寫主頁(yè)地址,其中<input type="hidden" name="ecmsfrom" value="url ">的意思是反饋表單提交后返回到首頁(yè)!
4、將制作好的表單模板粘貼到自定義單頁(yè)模板即可;
另外將上面截圖的表單代碼貼出來(lái),供大家學(xué)習(xí)使用(春哥仿站團(tuán)隊(duì)用的是默認(rèn)信息反饋分類)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
< form class = "form index-form" name = 'feedback' method = 'post' enctype = 'multipart/form-data' action = '../../e/enews/index.php' > < div class = "form-title" >免費(fèi)預(yù)約</ div > < input type = "hidden" name = "ecmsfrom" value="<?=$public_r['add_www.cgtblog.com.mwebsite']?>"> < input name = 'enews' type = 'hidden' value = 'AddFeedback' > < input name = 'title' type = 'hidden' value = '網(wǎng)站留言' > < div class = "form-group" > < input class = "form-control name" type = "text" name = "name" placeholder = "請(qǐng)輸入您的姓名..." data-required = "true" data-descriptions = "name" value = "" > </ div > < div class = "form-group" > < input type = "text" class = "form-control phone" name = "mycall" placeholder = "請(qǐng)輸入您的聯(lián)系方式..." data-required = "true" data-pattern = "^0?1[0-9][0-9]d{8}$" data-descriptions = "telphone" value = "" > </ div > < div class = "form-group" > < input type = "text" class = "form-control" name = "address" placeholder = "請(qǐng)輸入您的地址..." value = '' > </ div > < div class = "form-group" > < input type = "text" class = "form-control area" name = "saytext" placeholder = "請(qǐng)輸入您的需求..." data-required = "true" data-descriptions = "area" > </ div > < button class = "btn btn-primary btn-block" >立即預(yù)約</ button > < div class = "form-phone" >預(yù)約電話: < span ><?=$public_r['add_www.cgtblog.com.guhua']?></ span ></ div > </ form > |
這樣就ok了