I added in subscribe.phtml

<div class="g-recaptcha" data-sitekey="mysitekey"></div>

and added in local.xml

<block type="core/text" name="google.recaptcha">
    <action method="setText">
         <text><![CDATA[<script src="https://www.google.com/recaptcha/api.js"></script>]]></text>

But it is not working. I can still subscribe to newsletter without captcha answer.

What could be wrong?


I was facing the same issue and I made it solved by installing one extension "Google Invisible reCaptcha"

Wait... I changed few modifications in JS code also.

After installing extension set Site key and secret in admin side and open subscription.phtml


Add code just after Form Tag.

    <div class="g-recaptcha" data-sitekey="YOUR-SITE-KEY"></div>

In the last of file add this JS Snippet.

<script src='https://www.google.com/recaptcha/api.js'></script>
<script type="text/javascript">
    var yourFormValidationObj = new VarienForm('newsletter-validate-details');

    Validation.add('required-captcha-entry', ' ', function(v) {
        return !Validation.get('IsEmpty').test(v);

It worked for me. Cheers if it works for you..

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.