Ok so the code I'm trying to figure out so far is this:
function recaptchaCallback() {
$('#submitBtn').removeClass('btn-hide');
$('#submitBtn').addClass('btn-show');
if (grecaptcha.getResponse() == ''){
$('#submitBtn').addClass('btn-hide');
$('#submitBtn').removeClass('btn-show');
grecaptcha.reset();
}
}
What I'd like to do is something like this: if recaptcha = expired then do this {}
if (grecaptcha.getResponse() == ''){
I think is close to what I need, but how do we determine if the recaptcha has expired after the user validated they were human. The recaptcha expires after 60 seconds if a user validates and then doesn't press the submit button. At which point it needs to be revalidated, so it would make sense to disable the submit button when this happens too. Which is what I'm trying to accomplish.