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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Widgets /

Discuss SilverStripe Widgets.

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

cancel login widget 'auto-select'


Go to End


3 Posts   2190 Views

Avatar
Nickt

Community Member, 43 Posts

30 November 2009 at 4:48pm

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?

Avatar
mattclegg

Community Member, 56 Posts

21 January 2011 at 5:30am

I would like to know how to do this aswell.

Did you get it sorted Nickt?

Avatar
mattclegg

Community Member, 56 Posts

22 January 2011 at 5:03am

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;
	}