Welcome Guest, Not a member yet? Register   Sign In
Not a repost, but still can't solve: form_radio+set_radio
#1

[eluser]it.peds[/eluser]
Here is so far I get after searching this forum,
Code:
<?=form_radio(array('name'=>'myRadios','id'=>'dynamic'.$option->id,'value'='dynamic'.$option->value,'checked'=>set_radio('myRadios','dynamic'.$option->value,($selected == 'dynamic'.$option->value))))?>
Business case is to record which one of a random number of people selected something. I use foreach to generate the form_radio and other inputs for each person. I certain the database saved whoever selected, but the cannot repopulate the 'checked' attribute at all. I would like to be able to repopulate from both database and invalid_update(ie, fail form_validation, but still shows user last input unless it's empty). the output in the browser is,
Code:
<input type="radio" name="myRadio" id="dynamic#1" value="dynamic+value" />




Theme © iAndrew 2016 - Forum software by © MyBB