Answers.Body: <p>So I've done some development to enable CiviCRM Entity Reference (CER) fields that target CiviCRM Contacts, either via the Drupal contact edit form "/civicrm-contact/add" or via an entityreference field targeting contacts (which form has CER fields attached), that can be on nodes or other entity types, using the Inline Entity Form Single widget.</p>
  
  <p>Its available now on the -dev version of <a href="https://www.drupal.org/project/civicrm_entity" rel="nofollow noreferrer">CiviCRM Entity</a>, and will be in the next beta.</p>
  
  <p>Support for the Inline Entity Form Multi widget is not yet included, it will take another small leap to get it working there, although the foundation is now laid.</p>
  
  <p>The functionality for inline entity forms on either reference field type has worked and continues to work for node/entity edits.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-26T17:10:56.097Z
Answers.LastActivityDate: 2017-03-26T17:10:56.097Z
Answers.UserDisplayName: jackrabbithanna
Body: <p>i still building a drupal site with civicrm and civicrm_entity support and get stucked by adding form fields for adding synced contacts. </p>
  
  <p>a single contact is possible, but i need an email, phone and address field in addition. for that i used the civicrm entity reference field in the contact entity to add these references.</p>
  
  <p>but it seems that civicrm_entity cant support the submission of the fields to the civicrm database, because in the time where i send the form, the civicrm id doesnt exist. for that other ref fields cant have the needed civicrmID.</p>
  
  <p>did i miss something, or is this the wrong way to realise a contact submission with reference entitys from a drupal node to civi?</p>
  
  <p><a href="https://i.sstatic.net/scaqp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/scaqp.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-22T14:14:53.647Z
Comments.Text: This is a current limitation of the CiviCRM Entity Reference module.  It doesn't work with adding an entity, although there is a PR to start allowing this that is in my queue to review and should be pushed to the D.O page very soon. Currently to work around this, the method goes like this, do a hook_form_alter implementation, set the contact_id to some dummy value, then add a submit handler, in that submit handler update the contact_id of the child entities with the id of the contact after it is saved and has an id....Although this will be in the official release of CiviCRM Entity coming soon
Comments.UserDisplayName: jackrabbithanna
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-22T14:26:58.237Z
Comments.Text: Here's the PR, if you want to test it out, and provide feedback, that would be great...https://github.com/eileenmcnaughton/civicrm_entity/pull/102
Comments.UserDisplayName: jackrabbithanna
Tags: <drupal><civicrm-entity><entity-reference>
Title: Adding Referenced civicrm_entity contact in node with email, address and phone doesnt work
ThreadText: # Adding Referenced civicrm_entity contact in node with email, address and phone doesnt work
  
  (Asked by: username_0 on 2017-03-22)
  
  i still building a drupal site with civicrm and civicrm\_entity support and get stucked by adding form fields for adding synced contacts.
  
  a single contact is possible, but i need an email, phone and address field in addition. for that i used the civicrm entity reference field in the contact entity to add these references.
  
  but it seems that civicrm\_entity cant support the submission of the fields to the civicrm database, because in the time where i send the form, the civicrm id doesnt exist. for that other ref fields cant have the needed civicrmID.
  
  did i miss something, or is this the wrong way to realise a contact submission with reference entitys from a drupal node to civi?
  
  [![enter image description here](https://i.sstatic.net/scaqp.png)](https://i.sstatic.net/scaqp.png)
  
  **Tags:** drupal, civicrm-entity, entity-reference
  
  > **Comments:**
  > **username_1**: This is a current limitation of the CiviCRM Entity Reference module.  It doesn't work with adding an entity, although there is a PR to start allowing this that is in my queue to review and should be pushed to the D.O page very soon. Currently to work around this, the method goes like this, do a hook_form_alter implementation, set the contact_id to some dummy value, then add a submit handler, in that submit handler update the contact_id of the child entities with the id of the contact after it is saved and has an id....Although this will be in the official release of CiviCRM Entity coming soon  
  > **username_1**: Here's the PR, if you want to test it out, and provide feedback, that would be great...https://github.com/eileenmcnaughton/civicrm_entity/pull/102  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-26. Score: 1
  
  So I've done some development to enable CiviCRM Entity Reference (CER) fields that target CiviCRM Contacts, either via the Drupal contact edit form "/civicrm-contact/add" or via an entityreference field targeting contacts (which form has CER fields attached), that can be on nodes or other entity types, using the Inline Entity Form Single widget.
  
  Its available now on the -dev version of [CiviCRM Entity](https://www.drupal.org/project/civicrm_entity), and will be in the next beta.
  
  Support for the Inline Entity Form Multi widget is not yet included, it will take another small leap to get it working there, although the foundation is now laid.
  
  The functionality for inline entity forms on either reference field type has worked and continues to work for node/entity edits.
  
  
  ---
  
  