![]() |
How to validate a Checkbox form in Codeigniter and re-populate checked - 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: How to validate a Checkbox form in Codeigniter and re-populate checked (/showthread.php?tid=46907) |
How to validate a Checkbox form in Codeigniter and re-populate checked - El Forum - 11-19-2011 [eluser]serhat[/eluser] Obivously, I have 2 problems. 1. When I submit a checkbox form which is an array value and non-cheched form, It doesn't show me validation error such as 'this field is required'. It shows error when I check one of them. Normally it should have shown me even though I don't check anything on the form and just press submit. 2. How can I repopulate a checkbox as checked when I submit as checked. Think like set_value. In set_value it populates previous data. At this I want it to be auto checked when if I had submitted. My controller Code: function preferences() { My view Code: <div>Days to Deliver</div> |