Answer the question
In order to leave comments, you need to log in
How to pass a pre-selected value (its ID) of a pre-selected property to the form for adding / editing iblock.element.add.form elements?
How to pass a pre-selected value of a pre-selected infoblock property to the iblock.element.add.form add/edit form?
That is, we have a property in the infoblock, we have a number of values, the IDs of these values and the ID of this property are known.
Here, in the form, indicate the presence of this property and designate the ID of one of its values, without actually selecting anything in the form, the value ID already exists, you can generally not display this property for editing.
Answer the question
In order to leave comments, you need to log in
<?
//в компоненте
$APPLICATION->IncludeComponent(
"bitrix:iblock.element.add.form",
///////..........
"PROPERTY_CODES" => array("PROPERTY_СИМВОЛЬНЫЙКОДСВОЙСТВА"),
//////..........
);?>
<select id="town">
<option value="Moscow">Москва</option>
<option value="St. Petersburg">Санкт-Петербург</option>
<option value="Sochi">Сочи</option>
<option value="Novosibirsk" selected>Новосибирск</option>
<option value="Kazan">Казань</option>
</select>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question