I have a registration form with Bootstrap validator. I want to validate the google INVISIBLE reCaptcha (client-side) before submitting the form. There is some exapmle (Invoking the invisible reCAPTCHA challenge after client side validation). I tried to change this part:
function validate(event) {
event.preventDefault();
$('#form-reg').validator('validate').on('submit', function (e) {
if (e.isDefaultPrevented()) {
//...
} else {
grecaptcha.execute();
};
});
};
This does not work and I dont know if it's the right way. Please advice how to join invisible reCaptcha and Bootstrap validator. Thank you for your help.
The below code work for me
I used Unofficial Google Invisible reCAPTCHA PHP library in this program and you can download it from https://github.com/geordyjames/google-Invisible-reCAPTCHA . If this method doesn't work for you please comment below.