Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Having multiple instances on a page using spamprotection and comments #33

Open
DiscoPixel opened this issue Apr 10, 2016 · 2 comments
Open

Comments

@DiscoPixel
Copy link

Hi there,
I'm trying to create a blog with silverstripe-spamprotection and silverstripe-comments. The comments have 2 levels: comments and replies to comments. Since I want to protect the comments and their replies with recaptcha+spamprotection I'm using the CommentSpamProtection of silverstripe-spamprotection. But only the first captcha is rendered. I think it's due to the fact that multiple same HTML IDs are given to the containers and Google only renderes the captcha in the first container available.
Is there a way to get that working? Or can you confirm that multiple Recaptchas on one page are not supported by silverstripe-recaptcha + silverstripe-spamprotection + silverstripe-comments? Thanks for your reply

@Firesphere
Copy link

I think multiple ReCaptcha on a single page won't work, unless they have the same fieldname. @chillu You have anything about this? I could check up with that as well while working on the SS4 version?

@chillu
Copy link
Owner

chillu commented Dec 8, 2016

Its definitely possible, but not with <div class="g-recaptcha"> (see https://github.com/chillu/silverstripe-recaptcha/blob/master/templates/recaptcha.ss). We'd have to explicitly render the widget, see https://developers.google.com/recaptcha/docs/display

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

No branches or pull requests

3 participants