在线留言怎么做?拷贝inquiry.html的代码粘贴到/defalut目录新创建的模版message.htm文件中.
图片样式路径{dede:global.cfg_basehost/}/static
封面标题{dede:field.title/}_{dede:global.cfg_webname/}
关键字调用{dede:field.keywords/}
描述调用{dede:field.description function='html2text(@me)'/}
公共头部{dede:include filename="header.htm"/}
公共底部{dede:include filename="footer.htm"/}
面包屑导航栏目位置{dede:field name='position'/}
根据以上织梦调取标签代码正常对网站进行修改,然后登陆网站后台选择'留言板'更改栏目属性为频道封面(栏目本身不允许发布文档);修改高级选项中的封面模版为{style}/message.htm,点击确定.
百度搜索下[织梦在线留言],进行测试,参考织梦在线留言自定义表单制作
以下记录实现操作过程:
- 登录后台-频道模型-自定义表单-增加新的自定义表单
- 自定义表单名称填写'在线留言'-前台列表和内容页公开?-完全公开
- 点击自定义表单-管理/编辑-添加新字段
- 表单提示文字/字段名称/数据类型(基本单行文本varchar,除了内容可能多行文本),添加完毕,点击确定.
- 自定义表单管理-管理/前台预览-发布信息/查看源码-将其中的name、action、submit、input值进行替换-返回第②步选择'不公开'
- 说明:目标网站的在线留言存放在
<script src="{dede:global.cfg_basehost/}/static/js/feedback.js"></script>;先将它在html中进行注释;然后将它的在线form表单代码剪切至现在在线留言存放位置,最后参考⑤进行修改替换.
<form action="/plus/diy.php" enctype="multipart/form-data" method="post"> <input type="hidden" name="action" value="post"> <input type="hidden" name="diyid" value="1"> <input type="hidden" name="do" value="2"> <table style="width:97%;" cellpadding="0" cellspacing="1"> <tbody><tr> <td align="right" valign="top">姓名:</td> <td><input type="text" name="name" id="name" style="width:250px" class="intxt" value=""> </td> </tr> <tr> <td align="right" valign="top">电子邮件:</td> <td><input type="text" name="email" id="email" style="width:250px" class="intxt" value=""> </td> </tr> <tr> <td align="right" valign="top">电话:</td> <td><input type="text" name="phone" id="phone" style="width:250px" class="intxt" value=""> </td> </tr> <tr> <td align="right" valign="top">公司名:</td> <td><input type="text" name="companyname" id="companyname" style="width:250px" class="intxt" value=""> </td> </tr> <tr> <td align="right" valign="top">标题:</td> <td><input type="text" name="title" id="title" style="width:250px" class="intxt" value=""> </td> </tr> <tr> <td align="right" valign="top">内容:</td> <td><textarea name="content" id="content" style="width:90%;height:80"></textarea> </td> </tr> <input type="hidden" name="dede_fields" value="name,text;email,text;phone,text;companyname,text;title,text;content,multitext"> <input type="hidden" name="dede_fieldshash" value="5cfce27a34f1deb80afd4d750c9d67be"></tbody></table> <div align="center" style="height:30px;padding-top:10px;"> <input type="submit" name="submit" value="提 交" class="coolbg"> <input type="reset" name="reset" value="重 置" class="coolbg"> </div> </form>
转载请注明:大灰牛博客 » 织梦在线留言自定义表单制作