A
A
Askfortrue2021-03-23 10:06:10
1C-Bitrix
Askfortrue, 2021-03-23 10:06:10

Is it possible to specify in advance the section in which the element should be added in the "Adding Items" component?

Good afternoon!
Tell me if it is possible and how to determine in advance the section of the infoblock for which the form for adding an element will be configured.
That is, instead of entering the select that is embedded in the form, is it possible to determine in advance the section of the infoblock where the element will be added.
There is a property in the form responsible for linking to sections ["IBLOCK_SECTION"], I tried to write in the output code of the component "IBLOCK_SECTION => #, but not that.
Sections are defined in the form by section ID.
Maybe something needs to be written in the url to define the section, instead of using a select?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaliy Vayti, 2021-03-23
@vitvayti

From the description, I will assume that it is easier for you to take the Select that is displayed and make changes to the template:

  1. Assign the selected parameter to the desired select value, so you will have the selected section pre-installed
  2. Hide select with style

This can probably be done even at the css and js level, which will allow you not to change the component template.
Another option:
Remove from $arResult (or where the data for output in the form is taken from there) the key that is used to display the select and manually add input type text to the template with the desired value.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question