Answer the question
In order to leave comments, you need to log in
Why does PHP convert characters from uppercase to lowercase?
In Bitrix, in order for its ... additional properties to be displayed with capital letters UF_TIP_COMPANY[], otherwise saving does not occur.
Already made a multiple list capable of displaying checked and unchecked checkboxes.
Why does PHP convert characters from uppercase to lowercase?
global $USER;
$usr = $USER->GetID();
//$arFilter = array("ID" => $arEnum["ID"]);
$arFilter = array("ID" => $usr);
$arParams["SELECT"] = array("UF_TIP_COMPANY");
$arRes = CUser::GetList($by,$desc,$arFilter,$arParams);
if ($res = $arRes->Fetch()) {
while($arEnum = $UF_TIP_COMPANY->GetNext()){
$impParam = "name='UF_TIP_COMPANY[]'"; //обязательно только заглавные буквы
echo "<label><input type='checkbox' value='".$arEnum["ID"]." ".ucfirst($impParam)." ";
foreach ($res["UF_TIP_COMPANY"] as $idChecked) {
$rsRes= CUserFieldEnum::GetList(array(),
array(
"ID" => $idChecked,
)
);
if($arGender = $rsRes->GetNext()){
if($arEnum["ID"]==$idChecked){
echo "checked";
}
}
}
echo " />".$arEnum["VALUE"]."</label><br />";
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question