注冊頁面在其他頁面調(diào)用時(shí)應(yīng)該怎么寫?
想做一個(gè)彈出層注冊頁面
新頁面中
{if @in_array('username', $regfield)}
這段無效,應(yīng)該怎么寫?
{if @in_array('username', $regfield)}
<div class="form-group">
<label class="control-label visible-ie8 visible-ie9">會員名稱</label>
<input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="會員名稱" name="data[username]" />
</div>
{/if}
{if @in_array('phone', $regfield)}
<div class="form-group">
<label class="control-label visible-ie8 visible-ie9">手機(jī)號碼</label>
<input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="手機(jī)號碼" name="data[phone]" />
</div>
{/if}
{if @in_array('email', $regfield)}
<div class="form-group">
<label class="control-label visible-ie8 visible-ie9">安全郵箱</label>
<input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="安全郵箱" name="data[email]" />
</div>
{/if}
<div class="form-group">
<label class="control-label visible-ie8 visible-ie9">登錄密碼</label>
<input class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="登錄密碼" name="data[password]" />
</div>
<div class="form-group">
<label class="control-label visible-ie8 visible-ie9">確認(rèn)密碼</label>
<input class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="確認(rèn)密碼" name="data[password2]" />
</div>
{if $code}
<div class="form-group">
{if strlen(SYS_GEE_CAPTCHA_ID) > 10}
{dr_geetest()}
{else}
<div class="col-sm-6" style="padding-left:0;padding-right:0">
<input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="驗(yàn)證碼" name="code" />
</div>
<div class="col-sm-6">
<img align="absmiddle" id="dr_code_img" style="cursor:pointer;" onclick="this.src='{dr_member_url('api/captcha', array('width' => 120, 'height' => 40))}&'+Math.random();" src="{dr_member_url('api/captcha', array('width' => 120, 'height' => 40))}" />
</div>
{/if}
</div>
{/if}
{if @in_array('username', $regfield)}這種判斷只能在注冊頁面使用,其他頁面就無效的
{if $code}也無效
其他基本上沒問題,表單按鈕提交地址需要賦值注冊的url
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
明白你的意思,可是我想知道應(yīng)該怎么寫?
只能寫死
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
你的意思是把if判斷去掉,直接寫input框?
回復(fù)迅睿框架創(chuàng)始人
相信有很多用戶需要彈窗登錄和彈窗注冊功能,希望官方可以出一個(gè)標(biāo)準(zhǔn)的寫法
回復(fù)@疾風(fēng)
不是有教程嗎??
http://m.apdwn.com/v3doc/2518.html
這個(gè)教程只是登錄頁面的,我需要的是注冊頁面,而且這個(gè)頁面中的驗(yàn)證碼是寫死了,也就是說,頁面中寫了驗(yàn)證碼驗(yàn)證,后臺設(shè)置是否打開驗(yàn)證碼就無效了,同理,注冊頁面中,后臺設(shè)置的注冊名,手機(jī)號,email都無效了,都要通過前臺改代碼來啟用關(guān)閉這些功能了。
回復(fù)@九天網(wǎng)絡(luò)(JiuDay)