안녕하세요 수정시에 값이 저장안되는 문제입니다.
먼저 editor.php입니다.
<div class="attr-value">
<input type="hidden" name="kboard_option_type_color_text1" value="">
<input type="checkbox" name="kboard_option_type_color_text1" value="1"<?php if($content->option->type_text_color_text1 == '1'):?> checked<?php endif?>> 우드(엣지/1)
<input type="hidden" name="kboard_option_type_color_text2" value="">
<input type="checkbox" name="kboard_option_type_color_text2" value="2"<?php if($content->option->type_text_color_text2 == '2'):?> checked<?php endif?>> 우드(1)
<input type="hidden" name="kboard_option_type_color_text3" value="">
<input type="checkbox" name="kboard_option_type_color_text3" value="3"<?php if($content->option->type_text_color_text3 == '3'):?> checked<?php endif?>> 패브릭(1)
<input type="hidden" name="kboard_option_type_color_text4" value="">
<input type="checkbox" name="kboard_option_type_color_text4" value="4"<?php if($content->option->type_text_color_text4 == '4'):?> checked<?php endif?>> 레자(1)
<input type="hidden" name="kboard_option_type_color_text5" value="">
<input type="checkbox" name="kboard_option_type_color_text5" value="5"<?php if($content->option->type_text_color_text5 == '5'):?> checked<?php endif?>> 라미스(1)
<input type="hidden" name="kboard_option_type_color_text6" value="">
<input type="checkbox" name="kboard_option_type_color_text6" value="6"<?php if($content->option->type_text_color_text6 == '6'):?> checked<?php endif?>> 드로우(2)
<input type="hidden" name="kboard_option_type_color_text7" value="">
<input type="checkbox" name="kboard_option_type_color_text7" value="7"<?php if($content->option->type_text_color_text7 == '7'):?> checked<?php endif?>> 우드(2)
<input type="hidden" name="kboard_option_type_color_text8" value="">
<input type="checkbox" name="kboard_option_type_color_text8" value="8"<?php if($content->option->type_text_color_text8 == '8'):?> checked<?php endif?>> 패브릭(2)
<input type="hidden" name="kboard_option_type_color_text9" value="">
<input type="checkbox" name="kboard_option_type_color_text9" value="9"<?php if($content->option->type_text_color_text9 == '9'):?> checked<?php endif?>> 레자(2)
<input type="hidden" name="kboard_option_type_color_text10" value="">
<input type="checkbox" name="kboard_option_type_color_text10" value="10"<?php if($content->option->type_text_color_text10 == '10'):?> checked<?php endif?>> 라미스(2)
</div>
document.php입니다.
<span class="color_box_1">
<?php if($content->option->type_color_text1 == '1'):?>
<span class="color_text">
<strong>Wood</strong></br><strong class="color_font_strong" >Color</strong></br><span class="color_small_text">(Top Board)</span>
<span class="color_edge">
Edge
</span>
</span>
<?php endif?>
<?php if($content->option->type_color_text2 == '2'):?>
<span class="color_text color_padding">
<strong>Wood</strong></br><strong class="color_font_strong" >Color</strong></br><span class="color_small_text">(Top Board)</span>
</span>
<?php endif?>
<?php if($content->option->type_color_text3 == '3'):?>
<span class="color_text color_padding">
<strong>Fabric</strong></br><strong class="color_font_strong" >Color</strong></br><span class="color_small_text">(Top Board)</span>
</span>
<?php endif?>
<?php if($content->option->type_color_text4 == '4'):?>
<span class="color_text color_padding">
<strong>Reza</strong></br><strong class="color_font_strong" >Color</strong></br><span class="color_small_text">(Top Board)</span>
</span>
<?php endif?>
<?php if($content->option->type_color_text5 == '5'):?>
<span class="color_text color_padding">
<strong>Lamis</strong></br><strong class="color_font_strong" >Color</strong></br><span class="color_small_text">(Top Board)</span>
</span>
<?php endif?>
</span>
<input type="hidden" name="kboard_option_type_color_text1" value="">
<input type="checkbox" name="kboard_option_type_color_text1" value="1"<?php if($content->option->type_text_color_text1 == '1'):?> checked<?php endif?>> 우드(엣지/1)
이런식으로 히든필드와 묶어서 등록하게되면 수정시에도 유지되는것이 아니었나요..?
수정시에 체크되어있는 필드값이 사라지게됩니다.
이미 비슷한 방식으로 수차례 진행했으나 문제가 없었는데 갑자기 생겨 당황스럽네요..ㅠㅠ
코드 자체에는 문제가 없는것인지 궁금합니다!
항상 감사드립니다.
안녕하세요~^^
editor.php 파일의 $content->option->type_text_color_text1 부분이 잘못된 듯합니다.
<input type="hidden" name="kboard_option_type_color_text1" value="">
<input type="checkbox" name="kboard_option_type_color_text1" value="1"<?php if($content->option->type_text_color_text1 == '1'):?> checked<?php endif?>> 우드(엣지/1)
위의 코드를 아래의 코드로 교체해보세요.
<input type="hidden" name="kboard_option_type_color_text1" value="">
<input type="checkbox" name="kboard_option_type_color_text1" value="1"<?php if($content->option->type_color_text1 == '1'):?> checked<?php endif?>> 우드(엣지/1)
고맙습니다.
오타문제였네요 ㅠㅠ
감사합니다.
더 찬찬히 살펴본 후 질문 하겠습니다.