Answer the question
In order to leave comments, you need to log in
How can I intercept the data of the “Feedback” infoblock in Bitrix after the user clicks the “send” button?
In general, you need to intercept the sent data. And look at their structure, but I don’t know how to do it correctly ...
AddEventHandler('main', 'OnBeforeEventSend', Array("CRestApi", "generateLead"));
class CRestApi
{
function generateLead(&$arFields)
{
file_put_contents(__DIR__ . '/text.txt', print_r($arFields, 1));
}
}
Answer the question
In order to leave comments, you need to log in
If the form is just a Bitrix form on one page (that is, it is connected as $APPLICATION->IncludeComponent("bitrix:form.result.new"....) - then before this code you can analyze the $_POST in which data filled in.
But, as already mentioned, this is only one of the options.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question