I want to Rearrange and Rename the default fields with added fields on user registration form in drupal7 site, I could rearrange only the fields which is added by me but i want to rearrange combining both the default and added one. can anyone help on this.!

  • Is your requirement is to rearrange the order of fields in user registration form (Home » Administration » People) ..?? – Abin Oct 3 '15 at 10:06
  • @Abin: yes, i tried to rearrange the field here admin->config->people->account settings->manage fields, but i could not able to see the default fields – kashish Oct 3 '15 at 10:07
  • check this – Abin Oct 3 '15 at 10:34

Fields can be rearrange by changing '#weight' attribute of field in hook_form_alter(). You will have to create a custom module and have to alter the form and its element. The associative array would be something like this

$form['account']['name']['#weight'] = 7;  
  • where can i find this is it modules->user->user.module file?where can i find? – kashish Oct 5 '15 at 5:37

Implement hook_form_user_register_form_alter(). You can rearrange the $form array that is passed to this hook by adjusting the weights and titles.


The easy way, without any editing of configuration files is to just change the order of the fields in /admin/config/people/accounts/fields

Clear your caches and it's done.

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.