Resolved
Reported for: Toolset Forms 1.9.2.1
Resolved in: Toolset CRED 1.9.3
With CRED 1.9.2/1.9.2.1 and Types 2.2.17/2.2.18 installed, CRED Forms do not display the reCaptcha on the front-end, hence when an user submits the form, this error is produced:
Missing Captcha
This issue will be fixed in the next release of Toolset CRED.
Currently you can use the ReCaptcha only by adding the following into your theme functions.php:
add_action('wp_head', 'cred_192_recaptcha_patch'); function cred_192_recaptcha_patch() { ?> <script> var onLoadRecaptcha = function () { //Init of all recaptcha jQuery.each(jQuery('.g-recaptcha'), function (i, recaptcha_selector) { var $current_form = jQuery(recaptcha_selector).closest('form'); if (typeof grecaptcha !== 'undefined') { var _sitekey = jQuery($current_form).find('div.g-recaptcha').data('sitekey'); this.recaptchaId = (typeof _sitekey !== 'undefined') ? grecaptcha.render(jQuery('.g-recaptcha')[0], {sitekey: _sitekey}) : -1; } }); }; </script> <?php }
That works, many thanks Dave
Works fine! Thanks.
Waiting for the next release to remove the patch…
Sorry, is it resolved in new CRED 1.9.3? I didn’t see this in the release note
Hi eci38.fr, yes it is resolved in CRED 1.9.3