联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
如何判断用户是否提交过
类型:迅睿CMS 更新时间:2020-09-18 13:16:38

模块表单:https://www.xunruicms.com/doc/613.html

用户在内容页提交了模块表单,如何判断用户是否提交过?提交过的用户不显示模块表单了。

回帖
  • 迅睿粉丝
    #1楼    迅睿粉丝
    2020-09-18 12:57:55
    Chrome 0
    show.html
    {if $member && \Phpcmf\Service::M()->table_site(MOD_DIR."_form_AAAAA")->where("uid", $member.uid)->where("cid", $id)->counts()}
    提交过了
    {else}
    没有
    {/if}
    满意答案
  • 迅睿粉丝
    #2楼    迅睿粉丝
    2020-09-18 13:02:57
    Firefox 80.0 0
    {php extract(dr_get_mform_post_value(MOD_DIR, 'zhuangtai',$id))}
    {if $member && \Phpcmf\Service::M()->table_site(MOD_DIR."_form_zhuangtai")->where("uid", $member.uid)->where("cid", $id)->counts()}
    提交过了
    {else}
    <form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="fc-form-body">
    <input class="form-control dr_required " type="hidden" name="data[title]" id="dr_title" value="{$title}资料卡确认" required="required">
    <div class="form-group" id="dr_row_queren" style="display: none;">
    <div class="col-md-12"><div class="mt-radio-inline"><label class="mt-radio mt-radio-outline"><input type="radio" name="data[queren]" value="2" checked=""> 已确认 <span></span> </label></div></div>
    </div>
    </div>
    <div class="portlet-body form myfooter">
    <div class="form-actions text-center">
    <button style="margin-bottom: 20px;" type="button" onclick="dr_ajax_submit('{$post_url}', 'myform', '2000', '{$rt_url}')" class="btn btn1">确认</button>
    </div>
    </div>
    </form>
    {/if}
    我这里写进去,提示系统故障。回复迅睿框架创始人
  • 迅睿粉丝
    #3楼    迅睿粉丝
    2020-09-18 13:16:38
    Firefox 80.0 0
    迅睿框架创始人:正确正确正确正确正确正确正确正确正确