[eluser]Wayne Smallman[/eluser]
Guys, I've figured it out, and there were two things to consider.
In the first instance, I was doing some checking of values (this page handles both adding and editing), and I had the checking aspect the wrong way around.
Code:
$input_common['cash'] = array (
'name' => 'cash',
'id' => 'cash',
'value' => 'cash',
'checked' => ($this->arrayClassAttributes['results']['entries'][0]['category'] == 'cash') ? true : false
);
$input_common['bank'] = array (
'name' => 'bank',
'id' => 'bank',
'value' => 'bank',
'checked' => ($this->arrayClassAttributes['results']['entries'][0]['category'] == 'bank') ? true : false
);
In the second instance, form_radio() doesn't appear to like being supplied an array as the second argument. So I supplied actual values for each argument instead.
Code:
<dt><?php echo form_label('Cash?', $input_common['cash']['id']); ?></dt>
<dd><?php echo form_radio("category", $input_common['cash']['value'], $input_common['cash']['checked']); ?></dd>
<dt><?php echo form_label('Bank?', $input_common['bank']['id']); ?></dt>
<dd><?php echo form_radio("category", $input_common['bank']['value'], $input_common['bank']['checked']); ?></dd>