Answers.Body: <p>You need to use a <code>hook_form_alter</code> function in Drupal to accomplish this. In doing so, you can modify the weight of the items to appear <em>below</em> the existing form items.</p>
  
  <pre><code>function yourmod_form_alter(&amp;$form, &amp;$form_state, $formID) {
    if (($formID == 'user_register_form')) {
      $form['civicrm-profile-register']['#weight'] = somevalue;
    }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T18:23:26.587Z
Answers.Text: What Christia is describing is not default Drupal behaviour is it? This code may indeed achieve what she wants, but I wonder what the underlying cause of this is. eg theme? another module?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-15T07:42:01.423Z
Answers.Text: It didn't used to be in this order either so something must have changed it, like you said. I'll have to see if I can identify what module or theme changes were made around the time that it changed. Changes to the weight has no affect.
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T17:17:45.070Z
Answers.LastActivityDate: 2018-03-14T17:17:45.070Z
Answers.UserDisplayName: shaneonabike
Body: <p>I have created a custom profile in CiviCRM (<strong>Administer > Custom Data and Screens > Profiles</strong>) designated to be displayed on the Drupal registration page (see second screenshot), for users creating a new account. Initially, the CiviCRM profile was listed after the Drupal core elements: username, password, etc. But now the custom CiviCRM profile is displayed first.</p>
  
  <p>How can I rearrange the order? I looked in Drupal blocks and do not see anything regarding these and I've tried assigning an order of "50" to no avail.</p>
  
  <p>CiviCRM 4.7.27, Drupal 7</p>
  
  <p>In the screenshot below, you can see that the "Tell us more" and darker text section is the CiviCRM custom profile and what follows it are the Drupal core elements that I want to be at the top.</p>
  
  <p><a href="https://i.sstatic.net/fq1xt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fq1xt.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/S3Q6X.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/S3Q6X.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-09T20:13:20.350Z
Comments.Text: Ignore - I misread question and can't delete comment.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-02T17:55:15.500Z
Comments.Text: I am not sure what happened but this corrected itself.
Comments.UserDisplayName: Christia
Tags: <drupal><profile>
Title: Change order of custom profile fields on Drupal register page
ThreadText: # Change order of custom profile fields on Drupal register page
  
  (Asked by: username_0 on 2017-12-08)
  
  I have created a custom profile in CiviCRM (**Administer > Custom Data and Screens > Profiles**) designated to be displayed on the Drupal registration page (see second screenshot), for users creating a new account. Initially, the CiviCRM profile was listed after the Drupal core elements: username, password, etc. But now the custom CiviCRM profile is displayed first.
  
  How can I rearrange the order? I looked in Drupal blocks and do not see anything regarding these and I've tried assigning an order of "50" to no avail.
  
  CiviCRM 4.7.27, Drupal 7
  
  In the screenshot below, you can see that the "Tell us more" and darker text section is the CiviCRM custom profile and what follows it are the Drupal core elements that I want to be at the top.
  
  [![enter image description here](https://i.sstatic.net/fq1xt.png)](https://i.sstatic.net/fq1xt.png)
  
  [![enter image description here](https://i.sstatic.net/S3Q6X.png)](https://i.sstatic.net/S3Q6X.png)
  
  **Tags:** drupal, profile
  
  > **Comments:**
  > **username_1**: Ignore - I misread question and can't delete comment.  
  > **username_0**: I am not sure what happened but this corrected itself.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-03-14. Score: 1
  
  You need to use a hook_form_alter function in Drupal to accomplish this. In doing so, you can modify the weight of the items to appear below the existing form items.
  function yourmod_form_alter(&$form, &$form_state, $formID) {
    if (($formID == 'user_register_form')) {
      $form['civicrm-profile-register']['#weight'] = somevalue;
    }
  }
  
  > **Comments:**
  > **username_3**: What username_0 is describing is not default Drupal behaviour is it? This code may indeed achieve what she wants, but I wonder what the underlying cause of this is. eg theme? another module?  
  > **username_0**: It didn't used to be in this order either so something must have changed it, like you said. I'll have to see if I can identify what module or theme changes were made around the time that it changed. Changes to the weight has no affect.  
  
  ---
  
  