26

I have an entity which contains a field collection of entity references and can edit the entity references with the Entity selection mode is Simple (with optional filter by bundle), but only Entity Field Name x shows in the list.

I also created a view which displays information from the referenced entity, but when I switch the Entity selection mode to Views I get the message:

No eligible views were found. Create a view with an Entity Reference display, or add such a display to an existing view

.

After that I created a number of views of the Entity Reference display type, which display the same information but error message still comes up.

Can someone show me the steps to creating Entity Reference display views? PS. I think what I am doing my be tricker than usual because the entity reference is a multivalued element in a field collection, but I am able t create views on it though>

  • You should select a correct answer so this doesn't sit in the list of unanswered questions. – rooby Apr 21 '13 at 8:02
  • this is a question I asked a while ago. I will have to revisit the task I was trying to accomplish. It was tricky even back then – vfclists Apr 22 '13 at 9:47
30
+50

Create a node view with the appropriate filters etc. you need to get the results you want to have in the reference field.

Then in the top left under the heading "Displays", Click "Add" and then select "Entity reference".

Then that display will be available to your field.

Edit: It doesn't have to be a node view, if you are referencing other entity types.

  • Thanks! I looked for this for a long time too. This is a very helpful answer. It still says (content) after the view at the top of the screen, which I had previously thought meant that it wouldn't work. That is not true. This is the correct answer. – Karl Henselin May 12 '15 at 3:01
  • Does it works with drupal 8 ? – Matoeil Dec 1 '16 at 17:17
  • @Matoeil Yes, the entity reference display mode is still there in Drupal 8, however it is all in core now. – rooby Dec 2 '16 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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