consider i have a customer content type with fields (name, phone, address) and i have a feed back content type with an entity referenced field to customer.

When the user select the customer i want to show the phone and address somewhere near the field.

Is there a module for this? Or how do i do this?

1 Answer 1


There is an option to use views for populating the dropdown in the entity reference fields. Since you are building the options using views, you can pretty much customize it as you want.

Check out this video http://codekarate.com/daily-dose-of-drupal/using-views-entity-reference-module-drupal-7 for more details.

----------------THIS PART ADD BY QUESTIONER-----------------

Thanks to Gokul N K.

This tutorial made what i want in the view mode. What to do in the edit mode?

  1. Create a custom module
  2. Hook form_alter
  3. Add a HTML div just below the autocomplete field
  4. Inject some JavaScript and bind the auctomcompleteSelect trigger on your specified field.
  5. In the bind function add an ajax callback to acquire your desired information and display it inside the div.
  • Thanks i saw the video, it was helpfull but half of what i wanted. I also want according to this video, if IN EDIT MODE also when i select a customer from AUTOCOMPLETE entity-relation field, the contact appear i edit mode too Jun 23, 2015 at 23:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.