답변 2개
채택된 답변
+20 포인트
2017-06-26 (월) 07:51:27
1. 게시판 환경설정에 분류 라고 있는데 그 분류에 구인/구직 이라고 정합니다.
2. 만일 구인/구직 등록 할 때 입력 폼이 다르다면 여분필드 wr_1 ~ 10 (10개가 넘어가면 추가적으로 필드생성을 해줘야 됩니다.)까지가 있는데 그걸 분배해서 따로 입력을 받아야 합니다.
3.몇 일 전 라디오 버튼 선택에 따라 출력되는 div 질문 하셨죠? 그거에 답을 드렸고 그걸 응용하면 됩니다.
아래 소스는 글쓰기 스킨에 분류 선택창에 대입해서 대충 밑그림을 그렸으니 손 보시면 될듯 합니다.
Copy
<!-- 스크립트 시작 --><script>function div_OnOff(v,id){ // 셀렉트박스 if(v == "구인"){ document.getElementById("aaa").style.display = ""; // 보여줌 }else{ document.getElementById("aaa").style.display = "none"; // 숨김 }; if(v == "구직"){ document.getElementById("bbb").style.display = ""; // 보여줌 }else{ document.getElementById("bbb").style.display = "none"; // 숨김 }; }</script><!-- 스크립트 끝 --> <?php if ($is_category) { ?> <tr> <th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th> <td> <select name="ca_name" id="ca_name" required class="required" onchange="div_OnOff(this.value);"> <option value="">선택하세요</option> <?php echo $category_option ?> </select> </td> </tr> <?php } ?> <tr> <th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th> <td> <div id="autosave_wrapper"> <input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255"> <?php if ($is_member) { // 임시 저장된 글 기능 ?> <script src="<?php echo G5_JS_URL; ?>/autosave.js"></script> <?php if($editor_content_js) echo $editor_content_js; ?> <button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button> <div id="autosave_pop"> <strong>임시 저장된 글 목록</strong> <div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div> <ul></ul> <div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div> </div> <?php } ?> </div> </td> </tr> <tr> <td colspan="2"> <!-- 구인 폼 --> <div id="aaa"> <table> <tr> <th>나이</th> <td><input type="text" name="wr_1" value="<?php echo $write['wr_1']; ?>" class="frm_input"></td> </tr> <tr> <th>학력</th> <td><input type="text" name="wr_2" value="<?php echo $write['wr_2']; ?>" class="frm_input"></td> </tr> <tr> <th>경력</th> <td><input type="text" name="wr_3" value="<?php echo $write['wr_3']; ?>" class="frm_input"></td> </tr> <tr> <th>연락처</th> <td><input type="text" name="wr_4" value="<?php echo $write['wr_4']; ?>" class="frm_input"></td> </tr> <tr> <th>이메일</th> <td><input type="text" name="wr_5" value="<?php echo $write['wr_5']; ?>" class="frm_input"></td> </tr> </table> </div> <!-- 구직 폼 --> <div id="bbb" style="display:none"> <table> <tr> <th>나이</th> <td><input type="text" name="wr_6" value="<?php echo $write['wr_6']; ?>" class="frm_input"></td> </tr> <tr> <th>학력</th> <td><input type="text" name="wr_7" value="<?php echo $write['wr_7']; ?>" class="frm_input"></td> </tr> <tr> <th>경력</th> <td><input type="text" name="wr_8" value="<?php echo $write['wr_8']; ?>" class="frm_input"></td> </tr> <tr> <th>연락처</th> <td><input type="text" name="wr_9" value="<?php echo $write['wr_9']; ?>" class="frm_input"></td> </tr> <tr> <th>이메일</th> <td><input type="text" name="wr_10" value="<?php echo $write['wr_10']; ?>" class="frm_input"></td> </tr> </table> </div> </td> </tr> <tr> <th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th> <td class="wr_content"> <?php if($write_min || $write_max) { ?> <!-- 최소/최대 글자 수 사용 시 --> <p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p> <?php } ?> <?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?> <?php if($write_min || $write_max) { ?> <!-- 최소/최대 글자 수 사용 시 --> <div id="char_count_wrap"><span id="char_count"></span>글자</div> <?php } ?> </td> </tr>
2017-06-26 (월) 07:47:08
내용중 분류부분을 참고하시면 되실거 같습니다.
답변을 작성하려면 로그인이 필요합니다.