This is caused by the theme’s minify HTML setting.
The reCaptcha relies on a function written in the HTML
The theme’s minify setting causes this entire function (below) to be commented out as all whitespace is removed by minify.
This issue will, by default, effect all sites using this theme as the default setting is to minify the HTML.
//<![CDATA[
var recaptchaCallback = function() {
grecaptcha.render(‘g-recaptcha’, {
sitekey: “####”,
size: (window.innerWidth > 320) ? ‘normal’ : ‘compact’,
callback: ‘onCaptchaSuccess’,
});
};
var onCaptchaSuccess = function() {
var event;
try {
event = new Event(‘captchaSuccess’, {bubbles: true, cancelable: true});
} catch (e) {
event = document.createEvent(‘Event’);
event.initEvent(‘captchaSuccess’, true, true);
}
window.dispatchEvent(event);
}
//]]>