27

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>

2
  • You should select a correct answer so this doesn't sit in the list of unanswered questions.
    – rooby
    Commented Apr 21, 2013 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
    Commented Apr 22, 2013 at 9:47

1 Answer 1

31
+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.

3
  • 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. Commented May 12, 2015 at 3:01
  • Does it works with drupal 8 ?
    – Matoeil
    Commented Dec 1, 2016 at 17:17
  • 1
    @Matoeil Yes, the entity reference display mode is still there in Drupal 8, however it is all in core now.
    – rooby
    Commented Dec 2, 2016 at 0:14

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.