I'd like to change the text below the reset password field. I took a look at this answer, and it talks about changing the button, but I need a bit of help to change the text.

Here is the debug output and it looks like I need to access #description

[name] => Array
            [#type] => textfield
            [#title] => E-mail
            [#size] => 60
            [#maxlength] => 254
            [#required] => 1
            [#default_value] => 
            [#description] => A password reset message will be sent to your e-mail address.
            [#input] => 1
            [#autocomplete_path] => 
            [#process] => Array
                    [0] => ajax_process_form

This is how I would change the button:

function footheme_form_alter(&$form, &$form_state, $form_id) {
  if($form_id == 'user_pass') {
   $form['actions']['submit']['#value'] = t('reset password');
   print "boom";

Got it!

if($form_id == 'user_pass') {
   $form['name']['#description'] = t('This is a test');
| improve this answer | |

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.