reCaptcha integration in forms - configuration

Description:
I have a contact form that use the recaptcha integration via data-netlify-recaptcha= "true". The form works fine if I fill the form, check “I’m not a robot” and click send. Also the thank-you.html page will show up.

The issue I want to solve:
If I fill the form, and DO NOT check the “I’m not a robot” checker, and click send. The page will reload in the same url, with no warning or message at all. The form doesn’t pass and it is not showing in the form tab in netlity. I try to read some info in https://developers.google.com/recaptcha/docs/v3 but no clear solutions.

Any ideas how to set up this “I’m not a robot” as a required? or/and How to config a warning message to prevent people that the form wasn’t send?

Thanks in advance any leads in this topic.

One thing you can do is use a custom recaptcha instead. This gives you a lot more flexibility in terms of being able to customize the field or making it required. Let me know if that works for you.

1 Like

The custom captcha would work nice, but is there any way to do this with Netlify’s own Recaptcha that we know of? Currently trying to get this working on my site https://tonycre8.co.uk . If I enter the form without Recaptcha validation, my JavaScript will still show that “the message went through” despite the fact that it didn’t. Would there be any way to use JavaScript to target the Recaptcha element in order to validate it’s response? Or would it be better perhaps if you were to make a separate pop up window that displays the recaptcha after you enter the form information?

There is no really any configuration options with the netlify-injected recaptcha. What you could do is to some input validation where you disable the submit button by default and once the recaptcha field is populated, you can enable the button.

For a separate recaptcha popup, if you use the custom recaptcha, you can enable their invisible recaptcha which just pops up the recaptcha when needed.