Answer the question
In order to leave comments, you need to log in
Google reCaptcha and Dupal 7 problem updating captcha after ajax request?
Installed the reCapthca module , configured captcha display for forms created via the Webforms module . Forms work in ajax mode , the forms themselves are displayed normally and the captcha rises normally, there are no problems here, but if you send the form with empty required fields, then the captcha disappears and is not updated , everything works on standard modules, nothing is customized. How can I get the captcha to update after submitting the form?
Answer the question
In order to leave comments, you need to log in
В теории: при ajax-сабмите происходит полная замена контента блока формы, нужно дополнительно добавлять к нему контент самой капчи.
понял как обновлять капчу, нашел в оф документации
grecaptcha.render('g-recapID', {
'sitekey' : '6LfDYSgTAAAAAK4KsnNKfFwAhspu_9-2RX5Hn01a'
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question