add captch to registration modal box I have a modal box for login and registration for my site.

example.com
I want to add the captcha with the registration process.I added the captcha module in my site. But the captcha only work with the drupal's default registration page but not work with the modal box's registration.

How can I add the captcha with the modal box.
Try something like the following:

$form['my_captcha_element'] = array(
  '#type' =&gt; 'captcha',
  '#captcha_type' =&gt; 'captcha/Math',
);


More info here :https://www.drupal.org/node/743056