◇ 留言管理与制作
如何新增留言组?
在基础数据管理中,找到“留言分类”,打开管理页,增加一个新项。管理新增加的留言组,需要设置许可权限。在“用户-自定义权限”中配置。
如何制作留言模版?
写入下列代码即可。gid是分组ID,指定要提交到哪个留言组,onsubmit是表单提交时进行数据验证的JS函数,返回false会阻止表单提交。可参考“form的onsubmit属性”相关说
明。
<mp:msg gid="3" onsubmit="checkinput">
标题:<input id="subject" name="subject" type="text" />
内容:<textarea id="content" name="content" rows="5"></textarea>
姓名:<input id="name" name="name" type="text" />
邮箱:<input id="email" name="email" type="text" />
联系方式:<input id="contact" name="contact" type="text" />
<input id="Submit1" type="submit" value="提交" />
</mp:msg>
如何增加自定义留言字段?
在包含留言的模版文件中,增加input即可。
比如,在模版中增加 <input id="所在公司" name="所在公司" type="text" />,就表示在留言系统中扩展了一个自定义字段“所在公司”。
<mp:msg gid="3" onsubmit="checkinput">
标题:<input id="subject" name="subject" type="text" />
内容:<textarea id="content" name="content" rows="5"></textarea>
姓名:<input id="name" name="name" type="text" />
邮箱:<input id="email" name="email" type="text" />
联系方式:<input id="contact" name="contact" type="text" />
所在公司:<input id="所在公司" name="所在公司" type="text" />
<input id="Submit1" type="submit" value="提交" />
</mp:msg>
