Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWZRecaptchaType::RECAPTCHA_API_JS_SERVER does not exist #276

Open
hai-van-silkwires opened this issue Oct 7, 2021 · 1 comment
Open

Comments

@hai-van-silkwires
Copy link

Hi team,

I used above block code, it's seem EWZRecaptchaType::RECAPTCHA_API_JS_SERVER doesn't exist.

<div id="recaptcha-container"></div>
<script type="text/javascript">
    $(document).ready(function() {
        $.getScript("{{ constant('\\EWZ\\Bundle\\RecaptchaBundle\\Form\\Type\\EWZRecaptchaType::RECAPTCHA_API_JS_SERVER') }}", function() {
            Recaptcha.create("{{ form.recaptcha.get('public_key') }}", "recaptcha-container", {
                theme: "clean"
            });
        });
    });
</script>
@nhung-le
Copy link

nhung-le commented Feb 4, 2023

hello is there any solution for this yet? I also got

Undefined constant EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType::RECAPTCHA_API_JS_SERVER

Please update constant in your code, currently my temp solution is:

$.getScript("https://www.google.com/recaptcha/api.js", function() {
            Recaptcha.create("mykey, "recaptcha-container", {
                theme: "clean"
            });
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants