![]() |
retain state with radio buttons and checkboxes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: retain state with radio buttons and checkboxes (/showthread.php?tid=63635) |
retain state with radio buttons and checkboxes - webmachine - 11-21-2015 I looked everywhere in the forums and can't find an answer to how I would retain the value of a radio button, or a checkbox using set_radio() or set_checkbox() after a form is submitted. I also tried all sorts of ways of inserting set_radio() and set_checkbox(). What syntax should I use in the code below? Example: PHP Code: <div class="form-control"> RE: retain state with radio buttons and checkboxes - InsiteFX - 11-21-2015 Maybe this will help you out: CodeIgniter Checkboxes RE: retain state with radio buttons and checkboxes - webmachine - 11-21-2015 I checked that out and the tutorial doesn't use form-helper functions. My problem is how to integrate set_checkbox() and set_radio into the code that I have posted here, not into the normal php way of coding form controls. RE: retain state with radio buttons and checkboxes - orionstar - 11-21-2015 (11-21-2015, 10:41 AM)webmachine Wrote: I looked everywhere in the forums and can't find an answer to how I would retain the value of a radio button, or a checkbox using set_radio() or set_checkbox() after a form is submitted. I also tried all sorts of ways of inserting set_radio() and set_checkbox(). What syntax should I use in the code below? PHP Code: $data = array( RE: retain state with radio buttons and checkboxes - webmachine - 11-21-2015 Thanks, I'll try that out. Does the same thing work for the radio buttons? RE: retain state with radio buttons and checkboxes - orionstar - 11-21-2015 (11-21-2015, 07:42 PM)webmachine Wrote: Thanks, I'll try that out. Does the same thing work for the radio buttons? Quote: This function is identical to the set_checkbox() function above.http://www.codeigniter.com/user_guide/helpers/form_helper.html It should... |