迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
前台表单投稿如何成为文章模块内的文章
比如 文章 / news 内容页放置一个投稿表单newsform
1)自动选择当前页面所属栏目为投稿栏目
2)自动关联当前页面文章,调用时可以按关联条件调用
3)表单投稿后会成为news模块的一篇普通文章,表单投稿填写字段会有title,description ,content,
重点:表单投稿后会成为news模块内一篇普通文章,不存储到form数据表内
插件版权:官方插件插件名称:模块表单
<form action="" class="form-horizontal" method="post" name="newsform" id="newsform"> <input name="is_form" type="hidden" value="1"> <input name="is_admin" type="hidden" value="0"> <input name="is_tips" type="hidden" value=""> <input name="csrf_test_name" type="hidden" value="{csrf_hash()}"> <input name="is_draft" id="dr_is_draft" type="hidden" value="0"> <input name="module" id="dr_module" type="hidden" value="news"> <input id='dr_catid' name='catid' type="hidden" value="{$catid}"> <input name="id" id="dr_id" type="hidden" value="0"> <input name="data[title]" id="dr_title" value=""/> <script type="text/javascript" src="/api/ueditor/ueditor.config.js?v=20210409165251"></script> <script type="text/javascript" src="/api/ueditor/ueditor.all.min.js?v=20210409165251"></script> <script class="dr_ueditor" name="data[content]" type="text/plain" id="dr_content"></script><script type="text/javascript">$(function(){var editor_content=new baidu.editor.ui.Editor({ismobile:0,UEDITOR_HOME_URL:"/api/ueditor/",UEDITOR_ROOT_URL:"/api/ueditor/",serverUrl:"/index.php?s=api&c=file&token=a987a876a6f403a4404fb9243621aa8e&m=ueditor&image_reduce=0&attachment=0&is_wm=0&rid=news/home/add/id:0&",lang:"zh-cn",langPath:"/api/language/",toolbars:[["undo","redo","|","bold","italic","underline","fontborder","strikethrough","superscript","subscript","removeformat","formatmatch","autotypeset","blockquote","pasteplain","|","forecolor","backcolor","insertorderedlist","insertunorderedlist","selectall","cleardoc","|","rowspacingtop","rowspacingbottom","lineheight","|","customstyle","paragraph","fontfamily","fontsize","|","directionalityltr","directionalityrtl","indent","|","justifyleft","justifycenter","justifyright","justifyjustify","|","touppercase","tolowercase","|","link","unlink","anchor","|","imagenone","imageleft","imageright","imagecenter","|","simpleupload","insertimage","emotion","scrawl","insertvideo","attachment","map","insertframe","insertcode","template","background","|","horizontal","date","time","spechars","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","charts","|","print","preview","searchreplace","drafts"]],initialContent:"",pageBreakTag:"_ueditor_page_break_tag_",initialFrameWidth:"100%",initialFrameHeight:"400",initialStyle:"body{font-size:14px}",autoFloatEnabled:false,allowDivTransToP:true,autoHeightEnabled:false,charset:"utf-8",});editor_content.render("dr_content")});</script> <input name="data[description]" id="dr_description" value=""/> <input name="data[keywords]" id="dr_keywords" value="{$meta_keywords}"/> <input type="text" class="form-control" name="code">{dr_code(120, 35)} <button type="button" onclick="$('#dr_is_draft').val(0);dr_ajax_submit('/index.php?s=member&app=news&c=home&m=add', 'newsform', '2000')" class="btn green"> <i class="fa fa-save"></i> 保存内容</button> </form>