CodeIgniter Forums
Re-Populating Checkboxes - 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: Re-Populating Checkboxes (/showthread.php?tid=46355)



Re-Populating Checkboxes - El Forum - 10-28-2011

[eluser]Gukkie[/eluser]
Hello all, got a little problem here that i need solving, how do i re-populate a checkbox or multiple checkboxes if the form does'nt pass validation?

<li>&lt;?=form_checkbox('reg_interest[]', '1', FALSE);?&gt;<span>Games</span></li>
<li>&lt;?=form_checkbox('reg_interest[]', '2', FALSE);?&gt;<span>TV</span></li>
<li>&lt;?=form_checkbox('reg_interest[]', '3', FALSE);?&gt;<span>Cysling</span></li>
<li>&lt;?=form_checkbox('reg_interest[]', '4', FALSE);?&gt;<span>Swimming</span></li>

any help would be greatly appreciated Smile

Cheers!