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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

styling reCaptcha


Go to End


6 Posts   2794 Views

Avatar
DsX

Community Member, 178 Posts

25 February 2010 at 9:03am

Edited: 25/02/2010 9:41am

Hello.
I am using recaptcha with a new blog I am building.
Everything work great!!
However, I can't seem to change the style. (colors)
I am using the code supplied in mysite config:

$recaptchaField->jsOptions = array('theme' => 'clean');

(I have also tried => 'blackglass') and do not see any results.
I check the page source and the Javascript that I expect to find is not there... (how is this JS being included in the page?)

Has anyone here had luck styling reCaptcha, and if so could you share your methods?

thanks.

Avatar
Euphemismus

Community Member, 82 Posts

25 February 2010 at 9:47am

Hi,

I've looked into the code last night and this should work. Although it's a bit of a hack :-)

Avatar
DsX

Community Member, 178 Posts

25 February 2010 at 10:53am

Just tried that.. didn't work (I tried with and without the config setting, and I did a dev/build just for the heck of it.)
I check my page source and nothing is there for the JS, so I ask what method is to right this to the page (and what template?)

UPDATE: I do have it working now.. but its temporary (well I would like to have it setup via _config)

I added this to the top of themes/mytheme/templates/PageCommentInterface.ss

<script>
var RecaptchaOptions = {
   theme : 'blackglass'
};
</script>

at least Its working .

Avatar
George

Community Member, 41 Posts

25 February 2010 at 9:45pm

Hi,

in which template I have to enter this to change it for forms?

Thanks

Avatar
Platypus

Community Member, 43 Posts

7 March 2010 at 7:08am

Hi, I added this

<script type="text/javascript">
      var RecaptchaOptions = {
         theme : 'white'
         ,lang : 'de'
      };
   </script>

to my page.ss and ReCaptcha works fine, themed, in German and in team with the great Guestbook module, too.

Avatar
BamBam79

Community Member, 1 Post

27 July 2010 at 3:31pm

Hi Guys,

Why dont you add RecaptchaField::$js_options = array('theme' => 'clean'); to your config? This is the gobal static option that will work for all forms.