Support » Plugin: Contact Form 7 » annoying floating recaptcha box

  • With recaptcha v3 enabled in this plugin, there’s a floating popup on all pages of my site on the bottom right saying that my site is protected by recaptcha. How do I get rid of it?

    WP 4.9.9

Viewing 10 replies - 1 through 10 (of 10 total)
  • me too, i have tried hiding with css, but no luck.
    UPDATE found this code on another thread

    Just add the following CSS

    .grecaptcha-badge{display:none;}

    this worked to get rid of the box.

    • This reply was modified 10 months, 3 weeks ago by cjmicro.
    • This reply was modified 10 months, 3 weeks ago by cjmicro.
    Ashish

    (@ashishpatel1992)

    @cjmicro this is not the right solution, probably changing/removing or hiding the privacy policy and terms are against the terms set by Google.

    ok thanks for letting me know, i will see if i can figure out a different solution. moving to the other side of the page maybe.

    Ashish

    (@ashishpatel1992)

    The best practice would be to trigger the contact form/ captcha scripts running for the page where contact form shortcode is present and it should not be called on other pages.

    agreed, but i don’t know how to do that. 🙁

    from https://developers.google.com/recaptcha/docs/faq
    you are allowed to hide the badge completely but need to include

    This site is protected by reCAPTCHA and the Google
    Privacy Policy and
    Terms of Service apply.

    a very simple way to hide the badge except your contact page is by using css3 “not” selector

    body:not(.page-id-189) .grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
    }

    where .page-id-189 would be replaced with the page ID of your contact form

    The script still loads for each page, which is necessary for the recaptcha v3 to work properly. The badge displays on the contact page only.

    __________________

    I have also used:

    CSS & jquery – makes the badge only visible when a CF7 form is clicked or written into.
    It still loads the script on each page in the background – which is necessary.

    .grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
    transition: linear opacity 1s;
    }

    .grecaptcha-badge.showgr {
    visibility: visible;
    opacity: 1;
    transition: linear opacity 1s;
    }

    <script>
    $(document).ready(function () {
    $( “input[type=text],input[type=email], textarea ” ).focus(function() {
    $(‘.grecaptcha-badge’).addClass(‘showgr’);
    });
    });
    </script>

    may first have to call

    <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script>

    wow thank you so much!!! i appreciate your time in explaining this
    Cheryl

    This worked for me. It will hide the badge on all pages that don’t use CF7. This css and javascript should be used site-wide:

    Add this css:

    .grecaptcha-badge {display:none;}

    Add this javascript:

    grecaptcha.ready(function() {
    if ($(‘div.wpcf7’).length) {
    $(‘.grecaptcha-badge’).css( “display”, “block” );
    }
    });

    i found a plugin that uses the recaptcha 2. hopefully this will work at least til they change it again.

    https://wordpress.org/plugins/contact-form-7-simple-recaptcha/

    v3 is good for some people (like those that love having a badge on every page to be compliant), v2 is good for others. Both should be available.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘annoying floating recaptcha box’ is closed to new replies.