On the default registration form, I want to change the Username label to 'Request your username'

I tried putting this in my template.php::

function mymodule_form_alter(&$form, &$form_state, $form_id)
    if ($form_id == 'user_register_form' || $form_id == 'user_profile_form') {
        $form['account']['name']['#title'] = t('Request your username');

I cleared cache, but didn't see any changes.

  • template.php is a theme file, not a module file - therefore it should read mytheme_form_alter(...), or you need to create a custom module so that it becomes theme independant
    – Geoff
    Commented Nov 1, 2014 at 5:10

2 Answers 2


Just tested on a D7 site and it should work fine for you if you name the alter function "mytheme_form_alter" instead of "mymodule_form_alter"?

See this answer for more detail on module options: Changing the registration form

  1. You can alter it using form_alter() like suggested in this post User Login Form alters

  2. Otherwise there is String Overrides Module which is used to alter simple labels... here is a Tutorial for it.. !!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.