Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Google reCAPTCHA a required field? [closed]

How can I make Google's No CAPTCHA reCAPTCHA a required field?
I mean, I want to check it with HTML or JavaScript.

like image 221
Milad Avatar asked Apr 20 '15 15:04

Milad


People also ask

What does the G reCAPTCHA response field is required mean?

That means your captcha request didn't send to google properly. Did you see the badge logo on the right-bottom side? If not, you might render your captcha in a wrong way. You can post the code how you render your captcha in your view that I can have more info about your issue. All reactions.

How do I make reCAPTCHA invisible?

Invoking the reCAPTCHA verification programmatically can be achieved by rendering the challenge in a div with an attribute data-size="invisible" and programmatically calling execute. Create a div with data-size="invisible" . Call grecaptcha. execute from a javascript method.


1 Answers

What you have to do is prevent the form submission until you can validate the user response by using the Google reCaptcha verify callback, then, if it passes, allow the form to submit. See this answer: Google ReCAPTCHA how to make required? and also check the documentation: https://developers.google.com/recaptcha/docs/display#example

like image 151
colecmc Avatar answered Oct 11 '22 03:10

colecmc