CodeIgniter Forums
form_radio in a loop - 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: form_radio in a loop (/showthread.php?tid=18943)



form_radio in a loop - El Forum - 05-22-2009

[eluser]xeroblast[/eluser]
Code:
form_radio('feat',$prods->id,($prods->feat == 1) ? TRUE : FALSE)

this code is inside a loop (foreach).. why is it that the TRUE/FALSE values isn't getting the checked element? the radio button doesn't have a checked element in its attributes.


form_radio in a loop - El Forum - 05-22-2009

[eluser]xeroblast[/eluser]
SOLVED: just put the form_open() and it worked. don't know how/why...