Uncaught ReferenceError: grecaptcha is not defined

nmedai 11 Feb, 2025

Hi guys, I can't get the recaptcha v3 to work in CF8 (Wordpress). In both the backend and the frontend I get this message in the browser developers console:

chronoforms/:1031 Uncaught ReferenceError: grecaptcha is not defined at HTMLFormElement.<anonymous> (chronoforms/:1031:23168)(anonymous) @ chronoforms/:1031

and get the spinning wheel.  I have tried on multiple sites and domains, everywhere the same error.

something seems to be wrong here:

 

  if (this._element.querySelector(".g-recaptcha.v3")) {
                            e.preventDefault();
                            let form = this._element;
                            grecaptcha.ready((function() {
                                grecaptcha.execute(form.querySelector(".g-recaptcha.v3").getAttribute("data-sitekey3"), {
                                    action: "submit"
                                }).then((function(token) {
                                    form.querySelector(".g-recaptcha.v3").remove(),
                                    form.querySelector('[name="g-recaptcha-response"]').value = token,
                                    form.submit()
                                }
                                ))
                            }
                            ))

      

Max_admin 11 Feb, 2025
1 Likes

yes, this is a bug in the latest update for CF8 for WP, the next update should fix it, it's pending release

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
nmedai 11 Feb, 2025

Ok, thanks Max. Is there anything i can do until then to make it work, or is the next update coming soon?

Max_admin 11 Feb, 2025
Answer

You need the update, the fix involves a core code change

I have just published it, you can now download it from the Downloads page

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger