迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
模塊表單:http://223987.com/doc/613.html
用戶在內(nèi)容頁提交了模塊表單,如何判斷用戶是否提交過?提交過的用戶不顯示模塊表單了。
show.html
{if $member && \Phpcmf\Service::M()->table_site(MOD_DIR."_form_AAAAA")->where("uid", $member.uid)->where("cid", $id)->counts()} 提交過了 {else} 沒有 {/if}
{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}
我這里寫進去,提示系統(tǒng)故障。
回復(fù)迅睿框架創(chuàng)始人
show.html
{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}
我這里寫進去,提示系統(tǒng)故障。
回復(fù)迅睿框架創(chuàng)始人