Here how radio buttons can be manage using default values :
| Code: |
case 'radio':
$options = '';
$row->default_value = explode(',',$row->default_value);
$fieldvalues='';
foreach ($row->default_value as $optionset){
$fieldvalues .= '<input type="radio" name="'.$row->name.'" value="'.$optionset.'" id="'.$row->name.$optionset.'" '.$row->params.' />'.$optionset;
}
$html = str_replace('{fieldtitle}',$row->title,$row->fieldstyle);
$html = str_replace('{validationsign}',($row->validation_rule) ? ' *':'',$html);
$html = str_replace('{field}',$fieldvalues,$html);
$html = str_replace('{fielddesc}',$row->description,$html);
break;
|