How can I limit an entity reference selection to a specific field value on the reference
Pergunta
I have a content type Research
which has a an entity reference type of People
.
The problem is that I don't want to show ALL people but only people which have a certain value under their field named type
.
I was trying to find it here:
Anyone an idea how to only show a content-type for a certain field value of that content type
Solução
You can create an Entity Reference display in a view and use that to generate the available options.
- In your view of choice, create a new display of type Entity Reference and configure it so that it only shows the content you want.
- Navigate back to your field configuration screen (the one in your screenshot) and change Reference Method from "Default" to "Views: Filter by an entity reference view" and choose the display you created in step 1.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a drupal.stackexchange