[eluser]TheFuzzy0ne[/eluser]
Something that just occured to me... This may also work, and may make your code a bit more readable.
Code:
$attrs = array('name' => 'result', 'id' => 'id_resultval_1', 'class' => 'inputRadio');
echo form_radio($attrs, '1', set_radio('result', '1'));
Lets assume you have the value of the checkbox stored in your database as an integer (0=unchecked, 1=checked), and the column was called my_checkbox. You can pull the data out of the database, generate an array of default values based on that. You could then do the following to set the default value:
Code:
$attrs = array('name' => 'result', 'id' => 'id_resultval_1', 'class' => 'inputRadio');
echo form_radio($attrs, '1', set_radio('result', '1', ($defaults['my_checkbox'] == '1'));