Error Message
We detected that your site is not verifying reCAPTCHA solutions. This is required for the proper use of reCAPTCHA on your site. Please see our developer site for more information.
I created this reCaptcha code, it works well but I don not know how can I validate it, I thought it was validating with the function
grecaptcha.getResponse();
but it was not so.
Apparently The recaptcha worked well on the website but I just saw in Google admin the next message:
Requirements:
1.Do not use action="file.php"
in the form, only a javascript function in the form.
<!DOCTYPE>
<html>
<head >
<title></title>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script type="text/javascript">
function get_action() {
var v = grecaptcha.getResponse();
console.log("Resp" + v );
if (v == '') {
document.getElementById('captcha').innerHTML = "You can't leave Captcha Code empty";
return false;
}
else {
document.getElementById('captcha').innerHTML = "Captcha completed";
return true;
}
}
</script>
</head>
<body>
<form id="form1" onsubmit="return get_action();">
<div>
<div class="g-recaptcha" data-sitekey="6LdNIlAUAAAAADS_uVMUayu5Z8C0tw_jspdntbYl"></div>
</div>
<input type="submit" value="Button" />
<div id="captcha"></div>
</form>
</body>
</html>
May you help me Please. I would appreciate it a lot
How can I validate it since I need to use a javascript function onsubmit="return get_action();"
instead of action="file.php"
*when I submit?: