V
V
Vyacheslav172017-02-06 14:59:53
1C-Bitrix
Vyacheslav17, 2017-02-06 14:59:53

How to set up Ajax mode on the site for the feedback form?

Installed a feedback module on the site.
When you click the submit button, you go to an empty page, the site template is not loaded.

90c3388f744940caab4f76358d12b278.png

Enabled Ajax mode in the component:

"AJAX_MODE" => "Y",
      "AJAX_OPTION_ADDITIONAL" => "",
      "AJAX_OPTION_HISTORY" => "Y",
      "AJAX_OPTION_JUMP" => "Y",
      "AJAX_OPTION_STYLE" => "Y",

After pressing the submit button, if the required fields are not filled in, the form disappears and a warning about empty fields appears.
I added a "send another message" button to the template after the warning
:
<a href="<?=$APPLICATION->GetCurUri()?>#anchor">Отправить другое сообщение</a>


9bb17e0e836c4b1da2d48d0ec064c702.jpg

Clicking the button returns you to the form.

If after that you press the "send" button again when the required fields are not filled, then you go to an empty page with a warning about empty fields and the site template is not loaded, and the "send another message" button does not work.

On another site, this form works correctly, the Ajax mode did not have to be enabled.

2b5ceb5a45154efbad691d705112eea9.png

Tell me, please, what could be the reason, and how to fix it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yaroslav Alexandrov, 2017-02-06
@alexyarik

The most important thing you didn't write was "I installed the feedback module on the site." Which module, whose module, regular standard component or remade, etc. etc.

V
Vyacheslav17, 2017-02-06
@Vyacheslav17

altasib.feedback module Feedback
form - a simple web form builder from ALTASIB company
link
We needed a module with custom fields and the ability to attach files
Old version of jquery.

V
Valery Morozov, 2020-06-21
@warmy

It doesn’t work for me, but otherwise: it
doesn’t work correctly on CNC pages - after sending to the component area, the entire html page is loaded:
https://yadi.sk/i/2rprNu238LkL5g
You can check it here:
https://sunbow.ru/ firms/452/2984/ "Send a message to the contact e-mail"
Without CNC norms.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question