教给大家怎么创建自定义表单
初步完成了, 下面介绍单页怎调用出来!!
一般我们知道,系统只带格式肯定不是我们要的,我们可能是需要在联系我们那加入留言信息,或产品展示下面加上产品咨询等等这些问题。
哪我们改怎样做?很简单,先在后台点开“前台预览 ”查看源码。
织梦自定义表单预览
调用的单页面。把内容{dede:field.content/}改成或加上以下代码,调用好样式即可。(以下代码就是表单提交代码,放到内容页,单页均可)
form action=”/sls/plus/diy.php” enctype=”multipart/form-data” method=”post”
input type=”hidden” name=”action” value=https://www.aihao.org/post/”post” /
input type=”hidden” name=”diyid” value=https://www.aihao.org/post/”1″ /
input type=”hidden” name=”do” value=https://www.aihao.org/post/”2″ /
table style=”width:97%;” cellpadding=”0″ cellspacing=”1″
tr
td align=”right” valign=”top” 姓名: /td
td input type=’text’ name=’name’ id=’name’ style=’width:250px’ class=’intxt’ value=https://www.aihao.org/post/” /
/td
/tr
tr
td align=”right” valign=”top” 联系方式: /td
td input type=’text’ name=’lxfs’ id=’lxfs’ style=’width:250px’ class=’intxt’ value=https://www.aihao.org/post/” /
/td
/tr
tr
td align=”right” valign=”top” 留言内容: /td
td textarea name=’lynr’ id=’lynr’ style=’width:90%;height:180′ /textarea
/td
/tr
input type=”hidden” name=”dede_fields” value=https://www.aihao.org/post/”name,text;lxfs,text;lynr,multitext” /
input type=”hidden” name=”dede_fieldshash” value=https://www.aihao.org/post/”7b760f3f5239253a9a35fe4a4e57e04e” /
div align=’center’ style=’height:30px;padding-top:10px;’
input type=”submit” name=”submit” value=https://www.aihao.org/post/”提 交” class=’coolbg’ /
input type=”reset” name=”reset” value=https://www.aihao.org/post/”重 置” class=’coolbg’ /
/div
/form
不同的自定义表单查看到的代码是不一样的哦!以上只是参考,准确代码通过后台前台预览-发布信息页面查看源码
还有就怎样把留言的信息调用出来,别急,上面明白搞出来,下面就简单了。
{dede:loop table=’dede_diyform1′ sort=” row=’10’ if=”}
a href=https://www.aihao.org/post/'[field:dosxp/]’ target=”_blank” [field:ainixp/]
{/dede:loop}
‘dede_diyform1’ 是你要调用的表的名称 [field:dosxp/] 是你添加的表的字段名称 要想无需审核 提交之后立刻显示 在增加新表单的“前台列表和内容页公开?:”选项选择“完全公开”