excelwebzone / EWZRecaptchaBundle

This bundle provides easy reCAPTCHA form field for Symfony.
MIT License
396 stars 160 forks source link

Fix js error if recaptcha is loaded e.g. in a Modal with AJAX #271

Closed DemigodCode closed 2 years ago

DemigodCode commented 3 years ago

If you want to load a form in a modal after the site is completly loaded, it will fail with a javascript error.

Uncaught ReferenceError: grecaptcha is not defined

So the script tag has to be added via javascript and the grecaptcha.ready()-function has to be registered on the script.load()-event to prevent executing the ready()-function before the google-js is loaded.

excelwebzone commented 2 years ago

Already been fixed