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

Customise the Login Form


Go to End


7 Posts   4172 Views

Avatar
Bruce

Community Member, 29 Posts

30 August 2008 at 12:33pm

Hi,
I'm looking for something which I thought would be simple.
The login form labels the Username textbox as "Email"
but my users *don't* use an email for their access ID, .. and are easily confused by this.
Were do I modify the label in the form?
(I would like to change the "Email & Password" label in the tab as well)
ta
BWS

Avatar
Willr

Forum Moderator, 5523 Posts

30 August 2008 at 10:26pm

for the tab see the get_name() function in sapphire/security/memberauthenicator.php and also see MemberLoginForm.php for the label text.

Avatar
Bruce

Community Member, 29 Posts

3 September 2008 at 12:23am

... care to be a little less vague?
Not being a gun on OOP, I can't seem to pin down exactly *where* in MemberLoginForm.php the label strings are declared.
//BWS

Avatar
ryanwachtl

Community Member, 46 Posts

3 September 2008 at 3:43am

Hi Bruce,

Not sure if this is the preferred way to make your changes, but you can edit the labels in your language file. For example in lang/en_US.php

You can edit the following...

437       $lang['en_US']['Member']['EMAIL'] = array(
	     'Email', //change your Email Label Here
	     PR_MEDIUM,
	     'Noun'
);
481      $lang['en_US']['MemberAuthenticator']['TITLE'] = 'E-mail  & Password';
            //your tab label

Hope that helps some.

Avatar
Matt Hardwick

Community Member, 61 Posts

4 September 2008 at 9:49am

I am using the External Authenticator module, so don't use the default login tab, is there a way to remove the default tab safely?

Avatar
Matt Hardwick

Community Member, 61 Posts

5 September 2008 at 1:28am

Lancer told me where it was in an email;

You can edit out Authenticator:: stuff in /sapphire/_config.php

Avatar
Bruce

Community Member, 29 Posts

6 September 2008 at 12:29pm

t'riffic
Editing the language file did the job!
(I scanned thru that earlier, but missed the entry ... bugger)
... and thanks for showing the line numbers in your example .. it helped quickly find the offeding entry. :-)

Also, I actually removed the tab at the top of the form by removing the auth_openid directory, thus suppressing displaying *any* tabs.