[eluser]alanphil[/eluser]
In my view I'm creating a list of concerts, like this:
Code:
<?php foreach ($concerts as $row): ?>
<input type="radio" name="concert_selection" value="<?=$row->id?>"> <?=$row->concert_name?>, <?=$row->concert_date?>, <?=$row->count?> pair(s) of tickets available<br />
<?php endforeach; ?>
I'm trying to add validation to keep the selected radio button selected, if some other field fails validation. I've tried many variations of the following from the user guide:
Code:
<input type="radio" name="myradio" value="1" <?php echo $this->validation->set_radio('myradio', '1'); ?> />
When I try the following, the radio button isn't set after validation:
Code:
<?php echo $this->validation->set_radio('concert_selection', "<?=$row->id?>"); ?>
I've tried many variations of the above. What am I missing?
Alan