Jump to:

794 Posts in 409 Topics by 304 members

Widgets

SilverStripe Forums » Widgets » cancel login widget 'auto-select'

Discuss SilverStripe Widgets.

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

Page: 1
Go to End
Author Topic: 1477 Views
  • Nickt
    Avatar
    Community Member
    43 Posts

    cancel login widget 'auto-select' Link to this post

    when the page on my site loads, the 'username' form gets selected and my page slides down to view the widget. how do i change this, so that when the page loads none of the forms are selected?

  • mattclegg
    Avatar
    Community Member
    56 Posts

    Re: cancel login widget 'auto-select' Link to this post

    I would like to know how to do this aswell.

    Did you get it sorted Nickt?

  • mattclegg
    Avatar
    Community Member
    56 Posts

    Re: cancel login widget 'auto-select' Link to this post

    Got it! You can add the following;

    class Page_Controller extends ContentController {
       public function LoginForm() {
          $Validator=Validator::get_javascript_validator_handler();
          Validator::set_javascript_validation_handler('none');
          $form=parent::LoginForm();
          Validator::set_javascript_validation_handler($Validator);
          return $form;
       }

    1477 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.