How can I limit an entity reference selection to a specific field value on the reference

drupal.stackexchange https://drupal.stackexchange.com/questions/299576

  •  02-03-2021
  •  | 
  •  

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: enter image description here Anyone an idea how to only show a content-type for a certain field value of that content type

有帮助吗?

解决方案

You can create an Entity Reference display in a view and use that to generate the available options.

  1. 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.
  2. 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.
许可以下: CC-BY-SA归因
scroll top