Answer the question
In order to leave comments, you need to log in
How to reset reCaptcha after closing modal window?
There is a function to call reCaptcha
var initRec;
function initRecaptcha(modal) {
var captcha = modal.find(".g-recaptcha");
initRec = grecaptcha.render(captcha.attr("id"), {
"sitekey" : "SITE_KEY",
"callback" : function(token) {
captcha.parent().find(".g-recaptcha-response").val(token);
captcha.parent().submit();
}
});
}
$('.usluga1_btn').click(function() {
$('.usluga1_popup').bPopup({
onOpen: function() {
initRecaptcha($(this));
},
onClose: function() {
grecaptcha.reset(initRec);
}
});
});
Uncaught Error: reCAPTCHA has already been rendered in this element
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question