w

회원정보 수정 할때 비밀번호 필드는 숨겨 놓기

· 2023-03-29 (수) 15:26:21 · 4073

테마/register_form.skin.php 파일을 수정

토글로 체크 하면 나오도록 보여주는 소스입니다.

 

[code]

<?php

if ($is_member)

{

?>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>

// function by welcome - @

$(function() {
  $("#pass_question").on("click",function() {
    $(".answer").toggle(this.checked);
  });
});

</script>

<style>

.answer { display:none }

</style>

 

<tr class="question">
  <label for="pass_question">비밀번호 변경하시겠습니까?</label>
  <input id="pass_question" type="checkbox" name="pass_question" value="1" />
  <span class="item-text">Yes</span>
</tr>


<tr class="answer">
    <th scope="row"><label for="reg_mb_password">비밀번호<strong class="sound_only">필수</strong></label></th>
            <td><input type="password" name="mb_password" id="reg_mb_password" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
        </tr>
<tr class="answer">
    <th scope="row"><label for="reg_mb_password_re">비밀번호 확인<strong class="sound_only">필수</strong></label></th>
    <td><input type="password" name="mb_password_re" id="reg_mb_password_re" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
</tr>

 

<?php

}

else

{

?>

        <tr>
            <th scope="row"><label for="reg_mb_password">비밀번호<strong class="sound_only">필수</strong></label></th>
            <td><input type="password" name="mb_password" id="reg_mb_password" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
        </tr>
        <tr>
            <th scope="row"><label for="reg_mb_password_re">비밀번호 확인<strong class="sound_only">필수</strong></label></th>
            <td><input type="password" name="mb_password_re" id="reg_mb_password_re" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
        </tr>

<?php

}

?>

[/code]

|
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

2,788건
+
제목 글쓴이 날짜 조회
23-05-08 조회 5,107
23-05-04 조회 8,292
23-04-26 조회 4,854
23-04-24 조회 5,941
23-04-22 조회 4,814
23-04-22 조회 4,193
23-04-17 조회 5,215
23-04-16 조회 4,877
23-04-16 조회 4,780
23-04-15 조회 4,850
23-04-15 조회 6,943
23-04-14 조회 5,782
23-04-14 조회 4,869
23-04-13 조회 4,458
23-04-12 조회 4,908
23-04-11 조회 4,775
23-04-11 조회 4,231
23-04-09 조회 4,113
23-04-06 조회 5,203
23-04-05 조회 4,361
23-04-05 조회 3,942
23-04-03 조회 5,954
23-03-29 조회 3,910
23-03-29 조회 4,498
23-03-29 조회 4,540
23-03-29 조회 4,074
23-03-24 조회 3,951
23-03-23 조회 5,228
23-03-23 조회 4,730
23-03-16 조회 4,518