switch ($arAnswer["FIELD_TYPE"])
{
case "radio":
if (strpos($arAnswer["FIELD_PARAM"], "id=") === false)
{
$ans_id = $arAnswer["ID"];
$arAnswer["FIELD_PARAM"] .= " id=\"".$ans_id."\"";
}
else
{
$ans_id = "";
}
$value = CForm::GetRadioValue($FIELD_SID, $arAnswer, $arResult["arrVALUES"]);
if ($arResult["isFormErrors"] == 'Y')
{
if (
strpos(strtolower($arAnswer["FIELD_PARAM"]), "selected")!==false
||
strpos(strtolower($arAnswer["FIELD_PARAM"]), "checked")!==false)
{
$arAnswer["FIELD_PARAM"] = preg_replace("/checked|selected/i", "", $arAnswer["FIELD_PARAM"]);
}
}
$input = CForm::GetRadioField(
$FIELD_SID,
$arAnswer["ID"],
$value,
$arAnswer["FIELD_PARAM"]);
/*if (strlen($ans_id) > 0)
{*/
//$res .= $input;
$res .= "<label ".$arAnswer["FIELD_PARAM"].">".$input.$arAnswer["MESSAGE"]."</label>";
/*else }
{
$res .= "<label>".$input.$arAnswer["MESSAGE"]."</label>";
}*/
$arResult["QUESTIONS"][$FIELD_SID]["HTML_CODE"][] = $res;
break;
... |