function validateRecaptcha() { var response = grecaptcha.getResponse(); if (response.length === 0) { alert("not validated"); return true; // form will be submitted } else { alert("validated"); return false; //form will not be submitted }
response
function validateRecaptcha() { var response = grecaptcha.getResponse(); if (response.length === 0) { alert("not validated"); return false; // not valid then return false } else { alert("validated"); return true; // If valid then return true }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)