Adding a reference field to an entity sub-type

Add to Default shortcuts

Goal

Add an entity reference field to an entity sub-type; see Managing content structure for more information on entities and reference fields.

Steps

  1. Navigate to the page for managing the entity sub-type you want to add the field to. For example, to add a field to a content type, in the Manage administrative menu, navigate to Structure > Content types.
  2. Find the particular sub-type that you want to add the field to, and click Manage fields.
  3. Click Add field.
  4. In Add a new field, select the type of reference field you want to add. The Reference section of the select list shows the most common types of reference field; choose Other... if the entity type you want to reference is not listed.
  5. The Label field should now be visible; enter a label for the field, which is used as the field label for both content editing and content display.
  6. Click Save and continue.
  7. On the next screen, verify that the type of entity you want to reference is shown in Type of item to reference, or select it if not. Enter a value for Allowed number of values. You can limit the field to one value per entity item, a set number of values, or set it to have unlimited values. Click Save field settings.
  8. On the next screen, optionally edit the settings for Label, Help text (text to be displayed below the field on the content editing page), and Required field (to make it so a value must be entered in order to save the content when editing).
  9. In the Reference type section, you will usually want to limit the entity sub-types that can be referenced; for example, if you are creating a Content reference, you can check one or two Content type choices. The choices will be easier for content editors to scan if you also choose a sort value (normally the entity title or label field).
  10. Click Save settings. You should be returned to the Manage fields page, with your new field in the list.

Related topics