B
B
Bogdan2020-08-19 14:08:41
1C-Bitrix
Bogdan, 2020-08-19 14:08:41

Hook on successful form submission?

Hello. Don't tell me? There is an email template in the admin panel for sending an application.

5f3d0595bac93425048466.png

Here is the form sent to the page url

5f3d061212549883174409.png

In partners/new/index.php file

...
<?$APPLICATION->IncludeComponent(
  "bitrix:form.result.new", 
  "new_partner", 
  array(
    "CACHE_TIME" => "3600",
    "CACHE_TYPE" => "A",
    "CHAIN_ITEM_LINK" => "",
    "CHAIN_ITEM_TEXT" => "",
    "EDIT_URL" => "",
    "IGNORE_CUSTOM_TEMPLATE" => "N",
    "LIST_URL" => "",
    "SEF_MODE" => "N",
    "SUCCESS_URL" => "",
    "USE_EXTENDED_ERRORS" => "N",
    "WEB_FORM_ID" => "3",
    "COMPONENT_TEMPLATE" => "new_partner",
    "SEF_FOLDER" => "/ua/partners/new/",
    "VARIABLE_ALIASES" => array(
      "WEB_FORM_ID" => "WEB_FORM_ID",
      "RESULT_ID" => "RESULT_ID",
    )
  ),
  false
);?>

...


in the file bitrix/templates/sat_main/components/bitrix/form.result.new/new_partner/template.php I
see only the result of form validation.

<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
?>
<?if ($arResult["isFormErrors"] == "Y"):?><?=$arResult["FORM_ERRORS_TEXT"];?><?endif;?>
<?if ($arResult["isFormErrors"] == "N" && $arResult["isFormNote"] == "Y"){?>
<div class='form-note'>
  <span><?=GetMessage("FORM_NOTE")?></span>
</div>
<?}?>
<?if ($arResult["isFormNote"] != "Y")
{
?>
<?=$arResult["FORM_HEADER"]?>


<table>
<?
if (D["isFormDescription"] == "Y" || $arResult["isFormTitle"] == "Y" || $arResult["isFormImage"] == "Y")
{
?>

...


And where to find the method itself where the form is validated or successfully sent? Or maybe you can somehow create a hook that will work on successful submission?
I just need to transfer data from the site to 1C upon successful sending.

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-08-19
@bogdan_uman

https://dev.1c-bitrix.ru/api_help/form/events/onbe...
https://dev.1c-bitrix.ru/api_help/form/events/onaf...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question