[SOLVED] how Re-populating the check box value in form? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [SOLVED] how Re-populating the check box value in form? (/showthread.php?tid=30969) |
[SOLVED] how Re-populating the check box value in form? - El Forum - 06-01-2010 [eluser]suba[/eluser] Hi In my form , I have one group of check box, text box, drop down list. When I click submit button , I want to re-populate value in my selected check box. how is it? Text box & drop down list has worked properly. Example: Code: <? Thanks [SOLVED] how Re-populating the check box value in form? - El Forum - 06-01-2010 [eluser]Alex-Tunbridge[/eluser] Well check box's return TRUE or FALSE correct? Well so in your view just do something like. <input type="checkbox" name="name"<?=($checked ? ' CHECKED' : '')?>/> [SOLVED] how Re-populating the check box value in form? - El Forum - 06-01-2010 [eluser]suba[/eluser] hi all This is my form with re-populate check box value after submit . I solved my problem myself. This is my actual code. If you need, pls refer this for your future. Code: <? Thanks.. [SOLVED] how Re-populating the check box value in form? - El Forum - 08-14-2011 [eluser]sineld[/eluser] this is my way to this: Code: <?=form_checkbox(array('name' => 'uyeBilgi', 'value' => 1, 'checked' => (isset($_POST['uyeBilgi']) || !$_POST) ? true : false, 'id'=> 'uyeBilgi'))?> topic is may be old but I thought somebody may need it. |