S
S
SpectreZ2021-07-26 12:19:38
1C-Bitrix
SpectreZ, 2021-07-26 12:19:38

Why is an event not automatically generated when filling out a Bitrix web form?

Good afternoon.

I ran into a problem when setting up standard Bitrix web forms. After filling out the form, its result is saved, but the mail event is not created. On the "Advanced" tab in the form settings, the mail template is specified, next to it there is a check mark. The mail template has the FORM_FILLING_FORM_VACANCIES mail event type.
As far as I understand, when the form is filled in the b_event table , a FORM_FILLING _... entry should be created, but this does not happen. If you call CEvent::Send() manually from the PHP command line, then an entry is created.

To identify the cause of the problem, I took the following actions - called the CFormResult::Mail(7692) function, where 7692 is the result ID of the problematic form. When you try to call this function, the error "Error! Web form not found" is added to the log.

Here is the log, which first contains the array of the form result, and below - the log of the CFormResult::Mail() function. Surprisingly, FORM_ID is specified in the form result array, and the Mail function cannot find the form.

Host: 43464.test
Date: 2021-07-26 11:54:29
Module: 
array (
  'ID' => '7692',
  'TIMESTAMP_X' => '26.07.2021 11:54:29',
  'DATE_CREATE' => '26.07.2021 11:54:29',
  'STATUS_ID' => '17',
  'FORM_ID' => '19',
  'USER_ID' => '20549',
  'USER_AUTH' => 'Y',
  'STAT_GUEST_ID' => '0',
  'STAT_SESSION_ID' => '0',
  'SENT_TO_CRM' => 'N',
  'STATUS_TITLE' => 'DEFAULT',
  'STATUS_DESCRIPTION' => '',
  'STATUS_DEFAULT_VALUE' => 'Y',
  'STATUS_CSS' => 'statusgreen',
  'STATUS_HANDLER_IN' => '',
  'STATUS_HANDLER_OUT' => '',
)
    include < CAllForm::ExecHandlerAfterChangeStatus < CAllFormResult::Add < include < CBitrixComponent::__includeComponent
  V:\poldoma.test\bitrix\modules\form\classes\general\form_callform.php:246
  V:\poldoma.test\bitrix\modules\form\classes\general\form_callformresult.php:721
  V:\poldoma.test\bitrix\components\bitrix\form.result.new\component.php:202
  V:\poldoma.test\bitrix\modules\main\classes\general\component.php:605
  V:\poldoma.test\bitrix\modules\main\classes\general\component.php:680
----------
Host: 43464.test
Date: 2021-07-26 11:54:29
Module: 
Ошибка! Веб-форма не найдена<br>
    include < CAllForm::ExecHandlerAfterChangeStatus < CAllFormResult::Add < include < CBitrixComponent::__includeComponent
  V:\poldoma.test\bitrix\modules\form\classes\general\form_callform.php:246
  V:\poldoma.test\bitrix\modules\form\classes\general\form_callformresult.php:721
  V:\poldoma.test\bitrix\components\bitrix\form.result.new\component.php:202
  V:\poldoma.test\bitrix\modules\main\classes\general\component.php:605
  V:\poldoma.test\bitrix\modules\main\classes\general\component.php:680
----------


The situation is very similar to the one discussed in this thread , however, there was no specific answer there, except for the lack of checkmarks in the settings (which I have).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tgarl, 2021-07-26
@tgarl

The result of filling out the web form is being created for you, right?
You're in advanced web form mode right now, right?
Check the access of this web form, who has the right to set the status (as I see it, your web form ID is 'FORM_ID' => '19' ), then the status can be viewed on the page
/bitrix/admin/form_status_list.php?lang=ru&WEB_FORM_ID=19
if there is no status, then you didn’t start it (with the extended version, you need to start it manually yourself)
If there is a status, check who has the right to do what, sometimes they either forget to set it up after creation, or by switching the simplified mode and the extended one (back and forth), this part can fly off, resave.
It also happens that some first create a web form, then manually create a letter template by selecting the web form mail event, in this case it is not attached to the web form, although it glows that there is a binding, the template must be created through the web form. in this case again

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question