Support » Plugin: Invisible reCaptcha for WordPress » Does this work with AJAX?

  • Resolved lucasbustamante


    Hey buddy, I can’t get this to work, the request always fails. I’m using AJAX, could it be it?

    My email is and I’m available for Teamviewer if you’re willing!

    Thanks a lot!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Same problem here.

    I am the developer of wp-photo-album-plus plugin and i am trying to get it working on the comment form for individual photos. The comment is sent by an ajax call, and the captcha always fails.

    Does INVISIBLE also include that you even do not see a hidden input field ( like a wp nonce field ) in the page source?
    I added


    in the comment form, but do not see anything created by this in the page source as seen by the firefox inspector. If it had such a field i could easely add a value in the ajax call.

    FYI: The plugin is activated and seems to work; at least it shows the logo on the login screen.

    I am trying to add the code as explained by googles example:


    but i can not find the sitekey as entered in this plugins settings in the options.
    The option recaptcha_options is an array with 2 long keys (public_key and private_ket, but the sitekey is not there.
    Where can i find the site_key?



    NVM il let @mihche respond to this as i’m not a coder.

    • This reply was modified 1 year ago by  raykaii.
    • This reply was modified 1 year ago by  raykaii.
    • This reply was modified 1 year ago by  raykaii.
    • This reply was modified 1 year ago by  raykaii.
    • This reply was modified 1 year ago by  raykaii.
    • This reply was modified 1 year ago by  raykaii.
    • This reply was modified 1 year ago by  raykaii.

    It apears that <?php do_action('google_invre_render_widget_action'); ?> directly echos to the browser.
    Is there a way to catch it in a var or should i just put
    <div class="inv-recaptcha-holder"></div> into the code?
    What action should be taken when this code appears in the page by ajax or any other js function? I.e. what function is called normally at dom ready to ‘give life’ to the .inv-recaptcha-holder div?

    I got it this far that my commentform contains an iframe with a.o.:

    <input id="recaptcha-token" value="03AOP2lf7HDsnw12zSzAMohVFJZFHGbh_-F2PdqsxtpRaUAWacNYntz8vpId7yYc6tN0oe2c4GjZt9dx6woJ18GTZ_a_vL8-6bB7HqyF89Udg-.............................................etc.............ETkJeR28MiphvdIlcs7FS3cpwQVCrID-n5pRvsw61DjexbTxt3Nh6Vur5defZr2uv9bA_g7qfost4LOGixxI9aV-NnsLS8znwgzShrjkxLgDc1awvi9YHVeqyWyDbWUaED2BC50Jwcjqn9ZWuj-MtS0ANh2XU1pobwI4_skqgz0tYIMvCkDB3tafMmpofdeSi" type="hidden">

    Would it be sufficient to add this value to the ajax data like
    so that it will be seen by:
    $is_valid = apply_filters('google_invre_is_valid_request_filter', true);
    or do i need to do something different.

    Plugin Author MihChe


    Hi @opajaap,
    Just contact me through and let’s see if I can help you with this.




    My custom form ajax submitting stopped working after i’ve added
    <?php do_action('google_invre_render_widget_action');?> into it. The page began reloading when form submitted. I had to add “wpcf7-submit” class ( according to renderInvisibleReCaptcha function described in invisible-recaptcha\engine\PublicEngine.php ) to the form Submit button to make ajax submitting work again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Does this work with AJAX?’ is closed to new replies.