Answers.Body: <p>Seems you need to add a profile to the contribution page with <code>Account creation required</code> enabled.</p>
  
  <p>To do this -</p>
  
  <ul>
  <li>Check for the profile added to your contribution page on <code>Profiles</code> tab from <code>Manage Contritbuion Pages</code> or by visiting <code>civicrm/admin/contribute/custom?action=update&amp;reset=1&amp;id=&lt;page_id&gt;</code></li>
  <li>Navigate to Administer -> Customize Data and Screens -> Profiles.</li>
  <li>Click on <code>Settings</code> link for the profile added to your contribution page (Create if no profile is added).</li>
  <li>Open <code>Advanced Settings</code> tab and look for the <code>Drupal user account registration option?</code> input field.</li>
  <li>Enable <code>Account creation required</code> and navigate to the contribution page to see the populated drupal username field.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-28T11:26:32.073Z
Answers.Text: Thank you!  Adding a blank profile with "Account creation required" to the contribution page does indeed add just the username and password fields. Is it possible to add a specific Drupal role immediately or does that need to be done via sync?
Answers.UserDisplayName: Rachel
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-28T12:40:49.923Z
Answers.Text: Could be done via `rules` or need to do some code customisation in the extension.
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-29T21:44:25.027Z
Answers.Text: rules == drupal Rules module
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-28T06:56:10.350Z
Answers.LastActivityDate: 2017-10-28T06:56:10.350Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>We have one donation page that is just for donations. No Drupal account is created.  Individual members can create free accounts on the D7 site and can also donate through CiviCRM - this part is working as intended.</p>
  
  <p>We want to build a second donation page where a Drupal user account is created.  I was assuming there would be a simple way to enable the username and password inputs, and set a Drupal role to enable, on a particular donation page so the D7 account could be created when the form is submitted, but I don't see how to do this.</p>
  
  <p>Is there a way to either require an account be created, or allow it to be an option from a donation page?</p>
  
  <p>The goal here is to automate the process of setting up corporate sponsors.  Sponsors need to contribute and have a Drupal 7 account created with a specific role so they can access content that is restricted to that role.  They should be able to select a specific package or enter an amount they wish to contribute.</p>
  
  <p>Thanks,
  Rachel</p>
  
Tags: <drupal><civicontribute>
Title: Create Drupal user from donation pages?
ThreadText: # Create Drupal user from donation pages?
  
  (Asked by: username_0 on 2017-10-28)
  
  We have one donation page that is just for donations. No Drupal account is created. Individual members can create free accounts on the D7 site and can also donate through CiviCRM - this part is working as intended.
  
  We want to build a second donation page where a Drupal user account is created. I was assuming there would be a simple way to enable the username and password inputs, and set a Drupal role to enable, on a particular donation page so the D7 account could be created when the form is submitted, but I don't see how to do this.
  
  Is there a way to either require an account be created, or allow it to be an option from a donation page?
  
  The goal here is to automate the process of setting up corporate sponsors. Sponsors need to contribute and have a Drupal 7 account created with a specific role so they can access content that is restricted to that role. They should be able to select a specific package or enter an amount they wish to contribute.
  
  Thanks,
  username_0
  
  **Tags:** drupal, civicontribute
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-10-28. Score: 2 | Accepted answer
  
  Seems you need to add a profile to the contribution page with `Account creation required` enabled.
  
  To do this -
  
  * Check for the profile added to your contribution page on `Profiles` tab from `Manage Contritbuion Pages` or by visiting `civicrm/admin/contribute/custom?action=update&reset=1&id=`
  * Navigate to Administer -> Customize Data and Screens -> Profiles.
  * Click on `Settings` link for the profile added to your contribution page (Create if no profile is added).
  * Open `Advanced Settings` tab and look for the `Drupal user account registration option?` input field.
  * Enable `Account creation required` and navigate to the contribution page to see the populated drupal username field.
  
  > **Comments:**
  > **username_0**: Thank you!  Adding a blank profile with "Account creation required" to the contribution page does indeed add just the username and password fields. Is it possible to add a specific Drupal role immediately or does that need to be done via sync?  
  > **username_1**: Could be done via `rules` or need to do some code customisation in the extension.  
  > **username_2**: rules == drupal Rules module  
  
  ---
  
  