S
S
Sergey Zaigraev2016-08-24 14:18:37
Drupal
Sergey Zaigraev, 2016-08-24 14:18:37

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

3 answer(s)
X
xmoonlight, 2016-08-24
@xmoonlight

В теории: при ajax-сабмите происходит полная замена контента блока формы, нужно дополнительно добавлять к нему контент самой капчи.

Сергей Заиграев, 2016-08-24
@SergeyZaigraev Автор вопроса

понял как обновлять капчу, нашел в оф документации

grecaptcha.render('g-recapID', {
          'sitekey' : '6LfDYSgTAAAAAK4KsnNKfFwAhspu_9-2RX5Hn01a'
        });

но остался еще нюанс, в какой момент делать вызов данной функции после не правильного заполнения формы?

A
antiden, 2016-09-01
@donda

Maybe this will help...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question