Answers.Body: <p>My answer is an alternative that was used in order to accomplish what was needed. Rather than sync Drupal fields with CiviCRM fields, I activated the ability for CiviCRM fields to be used in Drupal views, as well as created custom profiles in CiviCRM to render the fields during the Drupal registration process. Please go ahead an add an answer if it answers the original question.</p>
  
  <ol>
  <li>Go to <a href="http://yourdomain.com/civicrm/admin/setting/uf?reset=1" rel="nofollow noreferrer">http://yourdomain.com/civicrm/admin/setting/uf?reset=1</a>, replacing "yourdomain.com" with your actual domain. Copy all the code shown.</li>
  <li><p>Edit your settings.php file and insert the code after the databases array, so it will look something like this:</p>
  
  <pre><code>$databases = array (
    'default' =&gt;
    array (
      'default' =&gt;
      array (
        'database' =&gt; 'drupal',
        'username' =&gt; 'user',
        'password' =&gt; 'password',
        'host' =&gt; 'localhost',
        'port' =&gt; '',
        'driver' =&gt; 'mysql',
        'prefix' =&gt; '',
      ),
    ),
  );
  </code></pre>
  
  <p>/* Beginning of pasted code from CiviCRM */</p></li>
  <li>Clear site caches and civicrm caches and you should be able to render CiviCRM fields in your Drupal views.</li>
  </ol>
  
  <p>Source: <a href="https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/</a> (Updated, thanks Aiden)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-29T20:54:02.373Z
Answers.Text: For current documentation see https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-29T16:13:46.153Z
Answers.LastActivityDate: 2017-11-29T21:13:52.257Z
Answers.LastEditDate: 2017-11-29T21:13:52.257Z
Answers.UserDisplayName: Christia
Body: <p>We have an online training platform and had created custom first and last name fields to be used on their training certificates. Drupal asks for this information when they register for an account. However, this first and last name is not passed on to CiviCRM until they fill it out again during the subscription process. </p>
  
  <p>How can I synchronize the first and last name fields in CiviCRM with the custom first and last name fields I created in Drupal? Thanks!</p>
  
  <p>CiviCRM 4.7.15, Drupal 7</p>
  
Tags: <drupal><custom-fields>
Title: Sync custom first and last name fields in Drupal with CiviCRM
ThreadText: # Sync custom first and last name fields in Drupal with CiviCRM
  
  (Asked by: username_0 on 2017-11-28)
  
  We have an online training platform and had created custom first and last name fields to be used on their training certificates. Drupal asks for this information when they register for an account. However, this first and last name is not passed on to CiviCRM until they fill it out again during the subscription process.
  
  How can I synchronize the first and last name fields in CiviCRM with the custom first and last name fields I created in Drupal? Thanks!
  
  CiviCRM 4.7.15, Drupal 7
  
  **Tags:** drupal, custom-fields
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-11-29. Score: 1 | Accepted answer
  
  My answer is an alternative that was used in order to accomplish what was needed. Rather than sync Drupal fields with CiviCRM fields, I activated the ability for CiviCRM fields to be used in Drupal views, as well as created custom profiles in CiviCRM to render the fields during the Drupal registration process. Please go ahead an add an answer if it answers the original question.
  
  1. Go to <http://yourdomain.com/civicrm/admin/setting/uf?reset=1>, replacing "yourdomain.com" with your actual domain. Copy all the code shown.
  2. Edit your settings.php file and insert the code after the databases array, so it will look something like this:
  
     ```
     $databases = array (
       'default' =>
       array (
         'default' =>
         array (
           'database' => 'drupal',
           'username' => 'user',
           'password' => 'password',
           'host' => 'localhost',
           'port' => '',
           'driver' => 'mysql',
           'prefix' => '',
         ),
       ),
     );
  
     ```
  
     /\* Beginning of pasted code from CiviCRM \*/
  3. Clear site caches and civicrm caches and you should be able to render CiviCRM fields in your Drupal views.
  
  Source: <https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/> (Updated, thanks Aiden)
  
  > **Comments:**
  > **username_1**: For current documentation see https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/  
  
  ---
  
  