Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

reCAPTCHA and Subsites

Go to End

2 Posts   732 Views


Community Member, 4 Posts

31 January 2013 at 12:12pm

We have multiple domains hosted using subsites, I'm enabling recaptcha (with spamprotection and userforms).

I have registered my domain names with Google recpatcha and received my dozen Public/Private keys, the problem is that the standard config for recaptcha only allows for one key.

The quick fix for now is to change the key to Global but I'd prefer not to use it this way long term.

Ideal answer would probably be to add fields to subsites for the recaptcha keys and have the recaptcha module pull them from there, that way the keys are maintainable through the cms.

My other thought involving less module customisation is to assign RecaptchaField::$public_api_key and RecaptchaField::$private_api_key based on the current subsite.

Has anyone run into and solved this issue already?

Thanks, Stephen.


Forum Moderator, 5523 Posts

9 February 2013 at 3:42pm

Any reason why a global key isn't an option? I normally select global so we simply have 1 set of keys to manage on each development, test and production server rather than swapping those out all the time.