Well, I dad to do my own hacking to get this to work. This is what I did in order to get ReCaptcha to work:
In class-emma-form.php starting at line 410, I changed:
$emma_form .= '<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback' . $form_unique . '&render=explicit" async defer></script>
to
$emma_form .= '<script src="https://www.google.com/recaptcha/api.js" async defer></script>
Then just below this is some included Javascript. The problem is that using this in short code content wraps any line breaks containing spaces in <p> tags and breaks the code. So I changed this:
$emma_form .= '<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback' . $form_unique . '&render=explicit" async defer></script>
<script type="text/javascript">
if ( typeof captchaExists == "undefined" ) {
var captchaExists = true;
} else {
captchaExists = true;
}
if ( typeof captchaInit == "undefined" ) {
var captchaInit = true;
var recaptchaSiteKey = "' . $recaptcha_settings['recaptchaSiteKey'] . '";
var goodCaptcha = function(){
setTimeout(emmaHideCaptcha, 2000);
}
function emmaHideCaptcha() {
// Unmark our submit button
// var submitButton = document.getElementById("emma-form-submit-' . $form_unique . '");
var submitButton = document.getElementsByClassName("activeForm")[0].getElementsByClassName("waiting")[0];
submitButton.className = "passed-captcha " + submitButton.className.replace( "waiting", "" );
submitButton.click();
}
}
</script>';
To this:
$emma_form .= '<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script type="text/javascript">
if ( typeof captchaExists == "undefined" ) {
var captchaExists = true;
} else {
captchaExists = true;
}
if ( typeof captchaInit == "undefined" ) {
var captchaInit = true;
var recaptchaSiteKey = "' . $recaptcha_settings['recaptchaSiteKey'] . '";
var goodCaptcha = function(){
setTimeout(emmaHideCaptcha, 2000);
}
function emmaHideCaptcha() {
// Unmark our submit button
// var submitButton = document.getElementById("emma-form-submit-' . $form_unique . '");
var submitButton = document.getElementsByClassName("activeForm")[0].getElementsByClassName("waiting")[0];
submitButton.className = "passed-captcha " + submitButton.className.replace( "waiting", "" );
submitButton.click();
}
}
</script>';
This seemed to do the trick.
Though I am sure a better programmer would know how to include that Javascript in a better way. Simply opening this file in a good text editor and auto-formatting it, will ruin it.