Answer the question
In order to leave comments, you need to log in
How to add a value to a multiple property of the html/text type in a specific property in Bitrix?
Adding a property to an element is easy:
if(CModule::IncludeModule("iblock"))
{
$ELEMENT_ID = "6095"; //ID элемента
$BL_ID = "32";//Ид блока
$PR_VALUE_NOTE['UF_NOTE_USER'][] = array("VALUE" => array ("TEXT" => "Вася привет!", "TYPE" => "text"));//переменная нотеузер, символьный код свойства типа html/text, далее сам текст и тип
CIBlockElement::SetPropertyValuesEx($ELEMENT_ID, $BL_ID, $PR_VALUE_NOTE);//апи добавления
}
Answer the question
In order to leave comments, you need to log in
Just in case: You can get data from the field
if(CModule::IncludeModule("iblock"))
{
$ELEMENT_ID = "6095";
$BL_ID = "32";
$VALUES = array();
$res = CIBlockElement::GetProperty($BL_ID, $ELEMENT_ID, Array("sort"=>"asc"), array("CODE" => "UF_NOTE_USER"));
while ($ob = $res->GetNext())
{
$VALUES[] = $ob['VALUE'];
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question