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

Load recaptcha script in the widget template #16

Open
Lanny opened this issue Oct 20, 2017 · 1 comment
Open

Load recaptcha script in the widget template #16

Lanny opened this issue Oct 20, 2017 · 1 comment

Comments

@Lanny
Copy link
Contributor

Lanny commented Oct 20, 2017

On pages where captcha display is conditional, in cases where no captcha is displayed, it would be nice to not load the captcha script. But if you're including {% recaptcha_init %} in a page's <head> tag you have to do the captcha check in two places. It would also make first time setup easier as you wouldn't need to edit any of your project templates to facilitate integration.

@kbytesys
Copy link
Owner

{% recaptcha_init %} is only a helper to make simpler to include the google script in your project. Only the explicit init is more complicated. I didn't understand what you mean with "you have to do the captcha check in two places", but I agree with you that you need to know if a page needs to display a recaptcha to make the init conditional.

I'm investigating for find a way to add it automatically, buy my concerns are about how pass parameters to initialization, how to place the code in the right position (inside head) and how to detect if it is already included.

If you don't mind I mark this issue as enhancement.

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

No branches or pull requests

2 participants