The Entity Reference field

The Entity Reference field is part of Drupal core and is available without enabling additional modules. Unlike other fields, Entity Reference appears as a grouping of specific items when adding a field. This is because you must pick a type of entity to reference. Follow these steps:

  1. The interface allows you to select a Content, File, Image, Taxonomy term, User, or Other. Selecting one of the predefined options will preconfigure the field's target entity type.
  2. When creating an Entity Reference field using the Other choice, you must specify the type of item to reference. This option cannot be changed once your data is saved.
You will note that there are two groups: content and configuration. Drupal uses configuration entities. Even though configuration is an option, you may not benefit from referencing those entity types. Only content entities have a way to be viewed. Referencing configuration entities would fall under an advanced use case implementation.
  1. Click on Save field settings to customize the field for this specific bundle.
  2. The Entity Reference field has two different methods to allow users to search for content: using the default autocomplete or a view.
  3. Depending on the type of entity you are referencing, there will be different entity properties that you may sort the results based on.
  4. The default field widget for an Entity Reference field is autocomplete, however, there is the option to use a select list or checkboxes for the available options.
  5. The values of an Entity Reference field can display the referenced entity's label or the rendered output. When rendering a label, it can be optionally linked to the entity itself. When displaying a rendered entity, you may choose a specific view mode.