Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7002241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:54:11+00:00 2026-05-27T20:54:11+00:00

The default user registration page in Drupal 7 has fields to enter a username,

  • 0

The default user registration page in Drupal 7 has fields to enter a username, password and an email address.

I have added some extra fields that show up in this form, but I would like to change the way it is displayed.

For example, I would like to change the order of the form items and add CSS.

Importantly, I would like to change the label that is displayed for Username – I would like it to say “Nickname” instead.

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:54:11+00:00Added an answer on May 27, 2026 at 8:54 pm

    You can change this on several layers:

    Translations:

    In settings.php you see some examples already, just add:

    $conf[‘locale_custom_strings_en’][”] = array(
    ‘Username’ => ‘Nickname’,
    ‘username’ => ‘nickname’,
    );

    You might want to override more strings, that contain username, such as “The username is invalid”. The UX is bad when you start mixing up these words, so in order to do what you want properly, you will have to change several such strings anyway, even if you go with one of the other options below. Most notably you will need to give the validation and error strings some attention.

    This, however, will change “username” to “nickname” sidewide! Also for admins and moderators. This might have unwanted side-effects, based on you broader specs and wishes.

    Theme override:

    In the template.php, you can override anything that gets passed to screen. In this case, you will need to override the login form template.

    The explicit code is too much to type in here. But in rough lines you need to:

    1. Tell Drupal you want to use a template for the user login form with hook_theme.
    2. Create the template file. And use any HTML you wish in there.

    Form override:

    In your theme and in modules, you can use hook_form_alter to override any theme.

    In your theme, you would add to template.php:

    function your_template_form_user_register_form_alter(&$form, &$form_state, $form_id) {
        $form['account']['name']['#title'] = t('Nickname');
    }
    

    Or, if you want more business logic (which does not belong in the theme layer), you’d create a module and add a form_alter there:

    function your_modulename_form_user_register_form_alter(&$form, &$form_state, $form_id) {
        if (_your_module_is_person_from_irc()) {
          $form['account']['name']['#title'] = t('Nickname');
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made customized user registration page. and i have made that on theme
I have a Drupal 7 with 1 field added to registration form - a
I have created custom registration form in drupal 6. i have used changed the
I have two pieces of data: 1) User and 2) Portfolio. Each user has
I have simple registration form. Once all information entered, user click submit button and
In my Joomla project, I need a user registration module, which has 3 kind
i am trying to make a custom login form in drupal-6.22 using Email Registration
I have registration form on my website that, using jquery I append default values
By using devise for user_auth it sets up some default routes (e.g. /user/edit and
I am trying to use Django's generic views to make a user registration page.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.