Answer the question
In order to leave comments, you need to log in
Why does ReCaptcha disappear on an ajax request in a Bitrix form?
Good evening. I have a form component. I call like this:
<?$APPLICATION->IncludeComponent(
"vilka:feedback",
"style2",
array(
"USE_CAPTCHA" => "Y",
"OK_TEXT" => GetMessage("OK_TEXT"),
"EMAIL_TO" => $defEmail,
"SHOW_FIELDS" => array(
0 => "NAME",
1 => "PHONE",
),
"REQUIRED_FIELDS" => array(
0 => "NAME",
1 => "PHONE",
),
"AJAX_MODE" => "Y",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"FORM_ID" => "548f0a3cd5265",
"MAIL_TITLE" => GetMessage("MAIL_TITLE"),
"COMPONENT_TEMPLATE" => "style2"
),
false
);?>
<div class="g-recaptcha" data-sitekey="<?=RE_SITE_KEY?>"></div>
Answer the question
In order to leave comments, you need to log in
well, you can see that the controller returns html in the response, which does not contain a captcha:
Accordingly, look for this template that arrives in the response and insert the captcha there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question