Magento 1 module which adds the Invisible ReCaptcha in some pages.

Installs: 208

Dependents: 0

Suggesters: 0

Security: 0

Stars: 12

Watchers: 6

Forks: 6

Open Issues: 1



dev-master 2022-03-22 17:42 UTC

This package is auto-updated.

Last update: 2023-01-22 19:29:12 UTC


This module adds the Invisible ReCaptcha from Google in all pages and setup the captcha only for the contact page.

Adding the JS in all pages is not a choice we made just because it's simple. It's also because most of the time you'll want to add the captcha in newsletter form and so on.


You need to get an API key from Google:

PHP >= 5.4

How it works

You can setup the API key in the admin panel: System > Configuration > General > Invisible Captcha

In that page you can set your site details and of course you can disable completely the captcha.

You can also choose if you want it by default to be on some pages.

Setup on my own form

It's easy.

Given the following example:

<form method="post">
        My Content
        <input type="text" name="content" />
    <button type="submit">Send</button>

You just have to make few changes (only additions):

+$_recaptcha = $this->helper('mbiz_invisiblecaptcha');
-<form method="post" id="myForm">
+<form method="post" id="myForm"
+    <?php if ($_recaptcha->isActive()): ?>
+        onsubmit="return captchaMyForm.uiSubmit('<?php echo $_recaptcha->getSiteKey(); ?>', onCaptchaMyFormSubmit, '#g-recaptcha-myform');"
+    <?php endif; ?>
         My Content
         <input type="text" name="content" />
     <button type="submit">Send</button>
+    <?php if ($_recaptcha->isActive()): ?>
+        <div class="g-recaptcha" id="g-recaptcha-myform"></div>
+    <?php endif; ?>
+<?php if ($_recaptcha->isActive()): ?>
+    <script type="text/javascript">
+        //<![CDATA[
+        var captchaMyForm = new MbizInvisibleRecaptchaForm('myForm', true);
+        var onCaptchaMyFormSubmit = captchaMyForm.onSubmit.bind(captchaMyForm);
+        //]]>
+    </script>
+<?php endif; ?>


See the LICENSE file.