Code: Select all
function CreateInputRadioGroup($id, $name, $items, $selectedvalue='', $addttext='')
Does anyone know if this has been fixed anywhere? Or if I am being blind.
Cheers,
Tom
Code: Select all
function CreateInputRadioGroup($id, $name, $items, $selectedvalue='', $addttext='')
Code: Select all
function CreateInputRadioGroup($id, $name, $items, $selectedvalue='', $addttext='')
{
$text = '';
foreach ($items as $key=>$value)
{
$text .= '<input type="radio" name="'.$id.$name.'" value="'.$value.'"';
if ($addttext != '')
{
$text .= ' ' . $addttext;
}
if ($selectedvalue == $value)
{
$text .= ' ' . 'checked="checked"';
}
$text .= ' />';
$text .= $key;
}
return $text;
}