Extra Form
PHP PHP 7.0
CMS Rhymix 1.x

개발자는 아니고...제로보드->XE->라이믹스 순으로 꾸역꾸역 이용만 해온 한 사용자 입니다. 

 

회원가입시 

 

기술 제공 정보 동의 (메일링) : 예 / 아니오

 

가 있는데 

 

메일링에 동의 해야만 회원가입 등록버튼이 활성화되도록 하려면 어떻게 해야할까요?

 

자체적으로 예/아니오 필수기입으로 세팅은 가능하지만...특정 선택지를 해야지만 넘어가도록 하는방법이 검색해도 모르겠더라구요;;;;

 

혹시 아시는 분이 계실까요?? 

 

멤버 모듈에서 회원가입 소스를 열어보면 아래와 같이 되어 있네요;;

 

<load target="css/trendshop_signup.css" />
<load target="../../tpl/js/signup_check.js" />
<!--%load_js_plugin("ui")-->
<!--%load_js_plugin("ui.datepicker")-->

<div id="signup-form" class="newclearfix">
    <div class="signup-title newclearfix"><img src="img/signup_title.png" title="Sign Up" style="width:126px; height:67px" /></div>

    <!--@if($XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == "modules/member/skins")-->
        <div class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
            <p>{$XE_VALIDATOR_MESSAGE}</p>
        </div>
    <!--@endif-->
    
    <form ruleset="@insertMember" id="fo_insert_member" action="/" method="post" enctype="multipart/form-data" class="form-horizontal">
        <input type="hidden" name="act" value="procMemberInsert" />
        <input type="hidden" name="xe_validator_id" value="modules/member/skins" />
        <input type="hidden" name="success_return_url" value="{getUrl('act','dispMemberInfo')}" />
        <input type="hidden" name="allow_message" value="Y" />

        <!--@if($member_config->agreement)-->
            <div class="agreement newclearfix">
                <div class="agree-text newclearfix">
                    {$member_config->agreement}
                </div>

                <div class="agree-confirm newclearfix">
                    <label for="accept_agree">
                        <input type="checkbox" name="accept_agreement" value="Y" id="accept_agree" />
                        {$lang->about_accept_agreement}
                    </label>
                </div>
            </div>  
            
        <!--@endif-->

        <h1>{$lang->cmd_signup}</h1>
        
        <table id="signup-table">
            <tbody>
                <tr class="first-tr">
                    <th><label for="{$identifierForm->name}" class="control-label"><em style="color:red">*</em> {$identifierForm->title}</label></th>
                    <td><input <!--@if($identifierForm->name=="email_address")-->type="email"<!--@else-->type="text"<!--@endif--> name="{$identifierForm->name}" id="{$identifierForm->name}" value="{$identifierForm->value}" required /></td>
                </tr>
                <tr>
                    <th><label for="password" class="control-label"><em style="color:red">*</em> {$lang->password}</label></th>
                    <td>
                        <input type="password" name="password" id="password" value="" required />
                        <p class="help-block">{$lang->about_password_strength[$member_config->password_strength]}</p>
                    </td>
                </tr>
                <tr>
                    <th><label for="password2" class="control-label"><em style="color:red">*</em> {$lang->password3}</label></th>
                    <td><input type="password" name="password2" id="password2" value="" required /></td>
                </tr>
                <!--@foreach($formTags as $formTag)-->
                    <!--@if($formTag->name != "signature")-->
                        <tr>
                            <th><label for="{$formTag->name}" class="control-label">{$formTag->title}</label></th>
                            <td>{$formTag->inputTag}</td>
                        </tr>
                    <!--@endif-->
                <!--@end-->

            
                <tr class="last-tr">
                    <th><label for="mailingYes" class="control-label">기술 정보 제공 동의 <br>(SMS, MAIL)</label></th>
                    <td>
                        <div style="padding-top:5px">
                          <label for="mailingYes"><input type="radio" name="allow_mailing" id="mailingYes" value="Y" checked="checked"|cond="$member_info->allow_mailing != 'N'" /> {$lang->cmd_yes} </label>

  <label for="mailingNo"><input type="radio" name="allow_mailing" id="mailingNo" value="N" checked="checked"|cond="$member_info->allow_mailing == 'N'" /> {$lang->cmd_no} </label>


<!--

-->


<!--
                            <label for="mailingYes"><input type="radio" name="allow_mailing" id="mailingYes" value="Y" checked="checked"|cond="$member_info->allow_mailing == 'Y'" /> {$lang->cmd_yes}</label>
                            <label for="mailingNo"><input type="radio" name="allow_mailing" id="mailingNo" value="N" checked="checked"|cond="$member_info->allow_mailing != 'Y'" /> {$lang->cmd_no}</label>
-->


                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
        
        <div class="signup-btn-area">
            <input type="submit" value="{$lang->cmd_registration}" class="signup-btn signup-btn-submit" /><a href="{getUrl('act','','member_srl','')}" class="signup-btn signup-btn-cancel">{$lang->cmd_cancel}</a>
        </div>
    </form>
</div>

<script>
jQuery(function($){
    // label for setup
    $('.control-label[for]').each(function(){
        var $this = $(this);
        if($this.attr('for') == ''){
            $this.attr('for', $this.next().children(':visible:first').attr('id'));
        }
    });
});
(function($){
    $(function(){
        var option = { changeMonth: true, changeYear: true, gotoCurrent: false,yearRange:'-100:+10', dateFormat:'yy-mm-dd', onSelect:function(){

            $(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
        };
        $.extend(option,$.datepicker.regional['{$lang_type}']);
        $(".inputDate").datepicker(option);
        $(".dateRemover").click(function() {
            $(this).prevAll('input').val('');
            return false;});
    });
})(jQuery);
</script>

  • profile
    이런 경우는 버튼을 가렸다가 활성화하는 것 만으로는 헛점이 있어 애드온 등으로 등록 요청시 해당 값을 확인 후 값이 다를 경우 등록을 중지하는 코드까지 구현을 하셔야 합니다.

    회원가입,회원정보수정 모두 대응하도록 만드셔야 하구요.
  • profile ?
    애드온을 만들어야 하는군요;;;지금이라도 공부를 해봐야 하나;;;
    간단하지 않네요 ㅎㅎ

    답변 감사합니다.

    일단 남이 만들어놓은 애드온 부터 뜯어봐야겠어요;;;;
  • ? profile
    세상에 내가 원하는 것을 간단하게 할 수 있는 건 많지 않더라구요.

    당장 필요하다면 이미 공부가 되신 분들께 의뢰를 드려 해당 자료를 만들어 적용하거나
    혹은 시간이 걸리더라도 공부해서 만들거나 선택지는 있는 거겠죠.
  • profile

    간단하게 해결하시려면, 해당 항목을 회원가입 확장변수로 처리하지 말고, 약관으로 처리하세요. 기술 제공 정보 동의 약관을 간단하게 쓰면, 약관에 동의해야 가입할수 있으니까요.

    그 다음 간단하게 하려면, 애드온에서 해당 질문에 "예"를 선택하면 회원그룹을 "정회원"으로, "아니오"로 선택하면 "준회원"으로 지정하고 가입하게 하셔도 됩니다. 준회원 권한을 많이 제한하면 되죠. 아예 회원가입이 안되게 하는 것보다는 이 편이 더 부드러울수도 있습니다. (이정도 애드온은 찾아보면 공개된 것이 있습니다).

    조금 진보하게 하려면, 회원가입 확장변수로 수많은 질문을 하고, 질문에 답하는 것에 따라 애드온에서 회원그룹을 자동할당할수도 있습니다. 일종의 AI인 셈입니다. 제가 이렇게 하고 있는데, 질문과 답의 조합을 범용으로 처리하기는 난해해서 하드코딩 하다 보니까, 해당 애드온을 공개할수는 없는것이 좀 아쉽기는 합니다.

  • profile ?
    !!!!!!!감사합니다. 약관에 다묶어 버린다라...!!!!!!