Hi vezraimanuel,
It looks like the reCAPTCHA code is getting loaded twice on the page — once by WPForms, and once by either your theme or another plugin, and this causes the error in the form.
The possible next steps could be:
1. You can try to track down what’s generating the other reCAPTCHA code and, if possible, turn it off.
If you’d like more help with this, as a Pro license holder you can submit a support ticket with your WordPress admin credentials so we can log into your site and help to track down the source of conflict.
2. You can enable No-Conflict Mode in WPForm’s reCAPTCHA settings (under WPForms > Settings > reCAPTCHA tab.
I hope this helps!
As a paid license holder, you have access to our private email support for quicker response. If you have any further questions, please feel welcome to submit a support ticket.
Thanks 🙂
Thread Starter
V.E.L
(@vezraimanuel)
hi @ethanchoi,
Support ticked submitted, thank you for your suggestion 😉
By the way, No-Conflict mode not working, and I don’t have other form-related plugin such as contact form 7, and i’m using Salient theme which i don’t see any recaptcha features built in it. can you enlighten me (from view source window) which recaptcha belongs to WPForms and which one is not?
thanks!
Thread Starter
V.E.L
(@vezraimanuel)
hi @ethanchoi
Problems solved now. I checked it out by installing fresh WP with no plugins and no options with only WPForms, turns out, this is the problem:
WPForm requires reCaptcha to be called with query string like this:
<script type='text/javascript' src='https://www.google.com/recaptcha/api.js?onload=wpformsRecaptchaLoad&render=explicit&ver=2.0.0'></script>
While I have custom function to remove query string from static resources, and the result was this:
<script type='text/javascript' src='https://www.google.com/recaptcha/api.js'></script>
So now I made expection for the recaptcha/api.js and everything works fine now. 🙂
Thanks a lot for your support! 🙂
FYI, this is my function:
function cleanup_query_string( $src ){
if ( stristr( $src, "google.com/recaptcha/api.js" ) ) {
return $src;
} else {
$parts = explode( '?', $src );
return $parts[0];
};
}
add_filter( 'script_loader_src', 'cleanup_query_string', 15, 1 );
-
This reply was modified 7 years ago by
V.E.L.