P
P
PaulTes2017-04-08 17:41:39
1C-Bitrix
PaulTes, 2017-04-08 17:41:39

How to create a new type of custom property in Bitrix with the ability to upload an image?

Hello, tell me how to create a custom infoblock property type so that an image can be set for the property? Moreover, I emphasize that the image is for the property, and not for the elements. Those. the image ID must be stored in the USER_TYPE_SETTINGS array of property settings. Why can't I do this? The fact is that when I open the settings window, and then click save, Bitrix just sort of serializes the data without saving anything. And only after pressing the save button, but already on the infoblock editing form, the PrepareSettings handler is called, but the information about the selected file has already been lost by this moment.
Pay attention to arResult, that's what I mean when talking about serialization:
f00d0dafd8f24b9db0429326e76e0741.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question