Hi All,
Is it possible to implement the gform_cdata_open and gform_cdata_close filters for the JavaScript of the recaptcha. It is currently giving errors cause we cannot wrap it. Should be a very quick fix:
public function ensure_recaptcha_js(){
?>
<script type="text/javascript"><?php echo apply_filters( 'gform_cdata_open', '' ); ?>
( function( $ ) {
$( document ).bind( 'gform_post_render', function() {
var gfRecaptchaPoller = setInterval( function() {
if( ! window.grecaptcha || ! window.grecaptcha.render ) {
return;
}
renderRecaptcha();
clearInterval( gfRecaptchaPoller );
}, 100 );
} );
} )( jQuery );
<?php echo apply_filters( 'gform_cdata_close', '' ); ?></script>
<?php
}