I am setting up a personal site in Drupal, and at the Login page it will have "Enter your Josh Mustillo username." Is it possible to change the "Josh Mustillo" to something else like "Enter your Username"?
(Domain is www.joshmustillo.com),
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityYou could do that by implementing the hook_form_alter
, in your custom module.
function MODULE_form_alter(&$form, &$form_state, $form_id) {
if($form_id == 'user_login') {
$form['name']['#description'] = t('Enter your username');
}
}
You can use the string overrides module to replace the text.
It's a little bit trickier to change strings with variable parts so here is a video that explains how to do it.
If you look into default settings.php There is something called String overrides
/**
436 * String overrides:
437 *
438 * To override specific strings on your site with or without enabling the Locale
439 * module, add an entry to this list. This functionality allows you to change
440 * a small number of your site's default English language interface strings.
441 *
442 * Remove the leading hash signs to enable.
443 */
444 # $conf['locale_custom_strings_en'][''] = array(
445 # 'forum' => 'Discussion board',
446 # '@count min' => '@count minutes',
447 # );
448
You can achieve this without any extra module.