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.

Archive /

Our old forums are still available as a read-only archive.

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

How do i define what the "Enter" button does?


Go to End


1532 Views

Avatar
cobi

Community Member, 5 Posts

1 February 2008 at 4:07am

Hi, here is my situation. I have created a login Form with the following fields and actions:

if(!$fields) {
$fields = new FieldSet(
new HiddenField("AuthenticationMethod", null, $this->authenticator_class, $this),
new LabelField("Usage Interne", "UsageInterne"),
new TextField("Email", "Représentant",
Session::get('SessionForms.MemberLoginForm.Email'), null, $this),
new CheckboxField("Remember", "mémorsier mon nom",
Session::get('SessionForms.MemberLoginForm.Remember'), $this),
new EncryptField("Password", "Mot de passe", null, $this)
);
}
if(!$actions) {
$actions = new FieldSet(
new FormAction("forgotPassword", "Vous avez oublié votre
mot de passe?"),
new FormAction("register", "S'INSCRIRE"),
new FormAction("dologin", "")
);
}

when i'm on the password field, and I press the "Enter" button, it brings me to the forgotPassword. How can I make it go the the "dologin" action when I press the "Enter" button.

Thanks

Steve