How to remove the descriptions from log in and registration page ?


I need to remove the description from the fields which are listed in the images.

These are both log in and registration page.

How can i do this?

1 Answer 1


you write a hook for user login form alter, then you can set the #description to null. you need something like this:

function YOURMODULE_user_login_form_alter(&$form, &$form_state) {
    $form['name']['#description'] = '';
  • 1
    Is there any common way to remove all the descriptions globally instead of mentioning in singular.
    – Fero
    Jan 3, 2012 at 10:43
  • 1
    if you want to do it globally then consider doing it with css (display: none), otherwise i dont think you can do it with any hook.
    – Firdous
    Jan 3, 2012 at 12:02
  • 2
    I have never tested it, but in theory, you should be able to expand on the code example above, to work on all forms, and then overwrite the description. Whether or not that's a good idea, is a completely different matter.
    – Letharion
    Jan 3, 2012 at 13:49
  • +1 for 'Whether or not that's a good idea, is a completely different matter.'
    – Chapabu
    Jan 3, 2012 at 14:52
  • You could also try using Tipsy which will hide all descriptions and then display them on mouseover. Seems like a much better idea than hiding them completely.
    – Chapabu
    Jan 3, 2012 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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