S
S
sagaton2022-02-08 11:09:54
1C-Bitrix
sagaton, 2022-02-08 11:09:54

How to set up the required fields when adding an IB element via the API?

There is a migration to create IB. You need to make a template for adding an IB element. In which there will be only a few fields and the rest will be deleted. Approximately as in the picture.
Please advise how this can be done.620226a93855a201515828.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-02-08
@idruweb

$formCategory = 'form';
$formName = 'form_element_' . $iblockId;

$arAdminTabs = \CAdminFormSettings::getTabsArray($formName);

$value = array(
  'tabs' => $tabsString
);

\CUserOptions::SetOption($formCategory, $formName, $value, true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question