document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('wpcf7submit', function(event) {
grecaptcha.execute('6LeCgH0qAAAAAF7B8BFo4FgL1Iw0gagahnqyldLu', {action: 'submit'}).then(function(token) {
var recaptchaResponse = document.createElement('input');
recaptchaResponse.setAttribute('type', 'hidden');
recaptchaResponse.setAttribute('name', 'g-recaptcha-response');
recaptchaResponse.setAttribute('value', token);
event.detail.contactForm.querySelector('form').appendChild(recaptchaResponse);
});
});
});
Call Now Button