hook_form_user_register_form_alter() does not customize user registration form I have implemented a hook_form_user_register_form_alter().

function hook_form_user_register_form_alter($form, $form_state, $form_id) {
  $form['account']['name']['#description'] = 'This is your login name. It will be displayed on the forums and in comments. This is not your billing information. Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.';
  $form['actions']['submit']['#value'] = 'Continue to subscription and payment page.';
  $form['#submit'][] = 'custom_user_register_submit';

  dpm($form);
}


When I use the registration page, I get mixed results. First of all, my custom_user_register_submit() function is called when I click the submit button. This is correct.

However, I get no changes to the form elements printed on the user registration page. For example, but button should have custom text. It does not; it uses the default text 'create new account'. Strangely, in the output from my dpm(), the values in those array elements match my custom code! So, it looks like my hook is implemented correctly and the form elements are being changed, but later in the Drupal bootstrap, they are overridden again and brought back to their defaults.

Anybody know a solution?
For all Drupal _alter hooks, you need to pass the variables you need to change as references. 

In your function, declaration, $form should be &amp;$form. This makes PHP pass a reference of that variable to inside if your function scope, so changes you make to the $form array persist.

So the function declaration should look like this (to alter both variables):
hook_form_user_register_form_alter(&amp;$form, &amp;$form_state)