reCaptcha is not showing in the registration form. It appears and functions normally without the module.

Comments

Spleshka’s picture

Status: Active » Closed (won't fix)

Sorry, but this is bug of reCaptcha module. It not loads JS properly on AJAX queries.
But you can disable captcha on ajax form by checking "Hide captcha in modal dialog" setting on Ajax Register settings page.

gabrjan’s picture

How can i do that? I can't find Ajax Register settings page. What is direct link to it?

Ismail Cherri’s picture

Hi,
You can access the settings by going to:
YOURSITE/admin/config/user-interface/ajax_register

reCaptcha works if you set it to use AJAX API in:
YOURSITE/admin/config/people/captcha/recaptcha

Hope that helped...

anandbej’s picture

@Ismail Cherri , how can you set the recaptcha to use ajaxAPI ? i don't see anything like the Recaptcha configuration page. please help.

voron’s picture

@anandbej You need to add needed js manually on ajax callback, something like:

  // We need to get recaptcha api.js.
  drupal_add_js(url('https://www.google.com/recaptcha/api.js', [
    'query' => [
      'hl' => 'en',
    ],
    'absolute' => TRUE,
  ]), [
    'defer' => TRUE,
    'type' => 'external',
    'scope' => 'footer',
  ]);

  drupal_add_js([
    'recaptcha_site_key' => variable_get('recaptcha_site_key', ''),
    'recaptcha_theme' => variable_get('recaptcha_theme', 'light'),
  ], 'setting');