I think I'm missing some simple here, but I can't figure it out for the life of me.
I'm using the set_radio() and set_checkbox() methods to return their values if validation fails, like this
<input type="radio" name="gender" value="male" <? if(!isset($thankyou)) { echo set_radio('gender', 'male'); } ?>/>;Male
<br />
<input type="radio" name="gender" value="female" <? if(!isset($thankyou)) { echo set_radio('gender', 'female'); } ?>/>;Female
I also have another array of checkboxes elsewhere which is larger. Everything is working fine, but on default, the second radio button is checked, and for the checkboxes, ALL of them are checked on default.
If I don't have set_radio / set_checkbox , they are not checked by default, which is what I want.
Adding the 3rd parameter to set_radio() ie. set_radio('gender','male',false) doesn't show any difference as well.
Can anyone shed any light on this please?
Thank you very much!