I have created some fields on my user registration page named like - First Name (machine name - field_first_name), Last name (machine name - field_last_name) etc..
I want to change their
#weight according to me to appear at the place where I like them to be from the form_alter function at my custom module..
For the default name & email I used -
$form['account']['name']['#weight'] = 7; $form['account']['field_first_name']['#weight'] = 8;
& it worked..
But If I am using for added fields in this way like -
$form['account']['field_first_name']['#weight'] = 6;
It's not working...
Can I get any help in this ?