How to add user info along with address info in a single form using 2 content types?


You probably should have a look to Profile2 module. If you really want to use content types, you should have a look to Inline Entity Form and then configure permissions to be sure users can only edit their own content.

Hope that helps ;-)

It sounds to me that you should have a look at the Entity connect module. Here are some details about it (from its project page):

Entity Connect now expands both

  • Entity reference
  • References (node_reference and user_reference)

fields by adding "add new content" and "edit current content" buttons.

It will work with all default widgets provided by Entity reference and References.

The Drupal module will allow you to dynamically create and edit entities (see bellow for the list of currently working entity types) which should be referenced into an Entity reference field.

It will help you to improve the User Experience for creation of new entities or edition of linked entities on your entity reference fields.

The "add a new" button will enable you to add / create a new entity. The first form will be cached then the new form will be generated. Once the new form is completed and saved the user will return to the original form.

The "edit" button will take the user to the edit form of the referenced entity. Once the user is done editing, he is sent back to the previous form.

Refer to Creating related records on the master for a first impression/intro about this module. This article is part of the illuminating Relativity Model for Drupal, for which this is an introduction to it (quoted from this linked page):

The Relativity Data Model for Drupal is a zero-custom-code, collection of steps, procedures and methods that strive to help site builders, users and site visitors interact with Drupal in a far easier and more efficient way. This is done by:

  • Data architecture and data modeling merging as a single step through a documentation procedure.
  • Customized user interfaces that cater to individual workflows throughout permission roles.
  • Multi-level relational data structures that relate to other multi-level relational structures.
  • Mimicking the concept of database joins within Drupal's UI's.
  • Vastly reducing the size of Drupal sites by a small handful of modules that provide greater power, speed and expansion capabilities.

The small handfull of modules (cfr. the last bullet) is detailed on Interface elegance and experience and is like so (apart from Drupal core):

Tags: Drupal 7 / Users

Similar questions

Using as shipping address the value entered as billing address
In Drupal Commerce 2 how can we allow a customer to select as shipping address the same address entered as billing address?
Address book problem when user edit the billing address
i just installed commerce address book module but i noticed that when authenticated users try to edit their billing address they have some options in the bottom that seems very strange and not necessary. The fist one is : The user is able to change the owner of the account and the second is : The user can change the status from active to disabled. ...
User registration without email address OR registration with pseudo-email address
I am programmatically creating users for the roles Parent (Adult) & Child (minor). During registration, minors (Children) typically will not have email addresses but Drupal user registration requires email address. During registration of minor, unfortunately, the adults email address cannot be reused based on Drupal’s one email rule. My queries...
Issue using Exposed filters along with contextual filters in views
I have a view page listing my stories/articles. I have a contextual filter based on the field Country which is a taxonomy term reference field. I have defined the path of the page as article-search/% to accommodate the contextual filter value. I have an exposed filter on the field article-category which is also of type taxonomy term reference. I us...
What are recommended filters for using Pagespeed along with Drupal 7 (and Advagg enabled)?
We are planning to integrate Google Pagespeed module in our Drupal 7 site which is already using Advanced for CSS/JS Aggregation (Advagg). Based on the inputs at , it seems that Pagespeed CSS/JS filters are not needed since the same job is done by Advagg. Pagespeed has other useful filters for ima...
Webform add data along with submitted values
I'm using Webform 6x 3.11 and have passed a nodeID into a hidden field called hidden_key. I have created a custom module to implement hook_form_alter() whereby I am trying to add additional data (along with the data that is being submitted) to the submission results. This additional data is based on some calculations performed on the value in the h...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.