Answer the question
In order to leave comments, you need to log in
How to call the bitrix:iblock.element.add.form component in edit mode?
Bitrix has a bitrix:iblock.element.add.form component, "Add / Edit Form". The question is what parameter should be passed to this component in order for it to work in edit mode?
For example, I have a News infoblock. As I thought, in order to display the bitrix:iblock.element.add.form component in the editing mode of a specific news item (infoblock element), I must pass the parameter - news ID or its symbolic code - to the component call code.
As I understand it, in the edit mode, the form fields should contain the data of a specific news item (infoblock element) whose identifier I am passing.
I tried to do this, passed ID, CODE to the component call code, but nothing works. What am I doing wrong?
Component call code:
<?$APPLICATION->IncludeComponent(
"bitrix:iblock.element.add.form",
"",
Array(
"CUSTOM_TITLE_DATE_ACTIVE_FROM" => "",
"CUSTOM_TITLE_DATE_ACTIVE_TO" => "",
"CUSTOM_TITLE_DETAIL_PICTURE" => "",
"CUSTOM_TITLE_DETAIL_TEXT" => "",
"CUSTOM_TITLE_IBLOCK_SECTION" => "",
"CUSTOM_TITLE_NAME" => "",
"CUSTOM_TITLE_PREVIEW_PICTURE" => "",
"CUSTOM_TITLE_PREVIEW_TEXT" => "",
"CUSTOM_TITLE_TAGS" => "",
"DEFAULT_INPUT_SIZE" => "30",
"DETAIL_TEXT_USE_HTML_EDITOR" => "Y",
"ELEMENT_ASSOC" => "CREATED_BY",
"GROUPS" => array("1","2","3","4","5","6","7","8","9"),
"IBLOCK_ID" => "1",
"IBLOCK_TYPE" => "news",
"LEVEL_LAST" => "Y",
"LIST_URL" => "",
"MAX_FILE_SIZE" => "0",
"MAX_LEVELS" => "100000",
"MAX_USER_ENTRIES" => "100000",
"PREVIEW_TEXT_USE_HTML_EDITOR" => "Y",
"PROPERTY_CODES" => array("NAME","TAGS","DATE_ACTIVE_FROM","DATE_ACTIVE_TO","IBLOCK_SECTION","PREVIEW_TEXT","PREVIEW_PICTURE","DETAIL_TEXT","DETAIL_PICTURE"),
"PROPERTY_CODES_REQUIRED" => array("NAME"),
"RESIZE_IMAGES" => "N",
"SEF_MODE" => "N",
"STATUS" => "ANY",
"STATUS_NEW" => "ANY",
"USER_MESSAGE_ADD" => "",
"USER_MESSAGE_EDIT" => "",
"USE_CAPTCHA" => "N"
)
);?>
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