Support » Plugin: Contact Form Block » ReCAPTCHA error in code?

  • Resolved blogzilla

    (@zkotito)


    Hi,

    Since my last post about Recaptcha, I was not able to make it work.
    Today I’ve tried something else:

    I’ve changed the code and it works:
    before it was : $recaptcha->score >= 0.5
    my after my edit it is: $recaptcha->score <= 0.01

    I’ve changed the value and the “>=”.

    I think I’ll leave this like that because now it works !
    but can you explain why I had to change “>=” to “<=” ? Error in the code of error from my side?

    thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter blogzilla

    (@zkotito)

    I’ll also add, that the translation in FR doesn’t work at 1 point:

    $html = __( ‘Ce site est protégé par reCAPTCHA. La politique de confidentialité et les conditions d’utilisations de Google sont en vigueur.’, ‘contact-form-block’ );

    wp-content/plugins/contact-form-block/classes/addons/recaptcha_v3.php line 17

    I had to change by myself the text in order to translate.
    Everywhere else, the automatic translation works well.

    thanks

    Hi Jordy,
    I have just been testing your contact from app for wordpress and am also having trouble getting the recaptcha to work. Have re-setup the google keys and am fairly sure that it is set correctly but on testing it doesn´t allow the comment…
    Have you any ideas?
    Thanks in advance,
    Mark
    PS sample page: https://devenirgris.com/2021/07/28/chapter-6-four-interesting-replacement-smartphones/

    Thread Starter blogzilla

    (@zkotito)

    in wp-content/plugins/contact-form-block/classes/addons/recaptcha_v3.php
    if you replace $recaptcha->score >= 0.5 by $recaptcha->score <= 0.5 it should work.

    • This reply was modified 1 year, 7 months ago by blogzilla.

    Blogzilla, thanks for the reply, I´ll give that a go! Best regards,

    Blogzilla,
    many thanks, now works perfectly 🙂
    merci beaucoup,
    MDW

    Grrr, Jordy, now it sends me the comment by mail but doesn’t appear on the dashboard/comments…. ?
    I shall go make some tea and think about it….
    regards,

    Thread Starter blogzilla

    (@zkotito)

    Hi devenirgris,

    The contact form only send the email to the email adresse in the settings.
    I think it is normal that you do not find anything in the dashboard/comment.

    Maybe I’m wrong, but I think it is how it should work.

    If you want store the comment in a “table”, I would use ACF Pro and then code a little something in order to store the message in a custom post type.

    On the link below, instead of create a .txt file, you could add a code in orer to store the message in a custom post type.
    https://meowapps.com/contact-form-block-faq-customization/#Do_something_after_the_email_has_been_sent

    Bonne journée 🙂

    🙂 now it all becomes clear… 🙂 thanks and bonne journée too 🙂
    regards, MDW

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘ReCAPTCHA error in code?’ is closed to new replies.