• Hello,
    I’m using recaptcha V3 for my custom form. (tried also with v2)

    <form target="_self" method="post" action="...secret...">
       <input type="text" required name="name" value="">
       <input type="email" required name="email" value="">
       <?php echo do_action( 'anr_captcha_form_field' ); ?>	
          <?php if (anr_verify_captcha() ) {
             echo '<input type="submit" value="Submit!">';
          } else {
             echo 'Error!';
          } ?>
    </form>

    Options:
    – Failed login Captcha is set to 0
    – Captcha Score is 0,5.
    – Logged in Hide is checked.

    The function is always showing “Error” unless I’m logged. What is wrong?
    Page: https://dropni.pl – newsletter fields

    • This topic was modified 3 years, 1 month ago by matredok.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Danny Jones

    (@distinctivepixels)

    Hi @matredok,

    Thanks for getting in touch.

    It seems you may have misunderstood how the plugin would work with a custom form.

    The function anr_verify_captcha() is not a user-facing function. Instead is actually what you need to use when processing your form once its POSTed, rather than something to show/hide form elements.

    The best example I can give you to understand what it does and how it would fit into your custom form id suggest to take a look at our plugin’s source code (specifically the file advanced-nocaptcha-recaptcha/anr-captcha-class.php)

    Here you can see how we implement this verification using filters such as “pre_comment_approved” and “validate_password_reset” and how it all works etc.

    I hope this helps. If there is anything else do let me know.

    Kind regards, Daniel @ WP White Security

    Thread Starter matredok

    (@matredok)

    I still don’t know how to do it ?? maybe I should try to find another solution ??

    Plugin Author robertabela

    (@robert681)

    Hello @matredok

    Sorry for the late reply on this. We are currently writing a FAQ on how to do this, which should help you address the issue. We’ll update this thread once we upload the article.

    Thank you for your patience and for using our plugin.

    Thread Starter matredok

    (@matredok)

    Nice, I think it’s a common problem ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘reCAPTCHA always false’ is closed to new replies.