Jump to:

10845 Posts in 2513 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » styling reCaptcha

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1588 Views
  • DsX
    Avatar
    Community Member
    178 Posts

    styling reCaptcha Link to this post

    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.

  • Euphemismus
    Avatar
    Community Member
    82 Posts

    Re: styling reCaptcha Link to this post

    Hi,

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

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: styling reCaptcha Link to this post

    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 .

  • George
    Avatar
    Community Member
    41 Posts

    Re: styling reCaptcha Link to this post

    Hi,

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

    Thanks

  • Platypus
    Avatar
    Community Member
    43 Posts

    Re: styling reCaptcha Link to this post

    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.

  • BamBam79
    Avatar
    Community Member
    1 Post

    Re: styling reCaptcha Link to this post

    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.

    1588 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.