This is my code so far:
<script type="text/javascript">
var widgetId1;
var onloadCallback = function() {
widgetId1 = grecaptcha.render('le_captcha', {
'sitekey' : 'xxx',
'theme' : 'light'
});
};
function check(){
alert(grecaptcha.getResponse(widgetId1));
}
function executeMeAfterSuccessfullValidation(){
alert('user passed');
}
</script>
<button onclick="check()">check if passed</button>
<div id="le_captcha"></div>
I want executeMeAfterSuccessfullValidation
to be called after the user successfully validate.
There is nothing in their docs how to do that: https://developers.google.com/recaptcha/docs/display
But I've seen some websites doing it. How?
Thanks in advance