Reference Field vs Select Field vs Tags Field

The “Reference” field, the “Select” field and the default “Tags” field of a content type serve totally different purposes. However, since they have something in common (i.e., selecting among the given options or categorizing entries), it may be a difficult and confusing decision on which field to use for your use case.

Let’s have a look at the characteristics of these three fields and their usage recommendations.

Reference Fields

  • Reference fields are commonly used to add references to other entries
  • On the entry page, the reference field is like a dropdown list that shows all entries of the referred content type(s) as available options
  • When an option is selected, a reference to that entry is stored in the backend
  • Examples of usage:
    • “Category” field within Blog content type
    • “Author” field within Blog content type
    • “Store Location” field within Product content type
    • For navigation of site
  • Using a reference field helps in:
    • Avoiding rework in case of changes: If there is any change in the referred entry, it automatically gets reflected in all the entries where it was referred. For example, if the author changes her profile image, it would reflect in all the entries where the author’s entry was referred.
    • Avoiding manual work of adding data repeatedly: Instead of repeatedly adding author details on each blog post, simply select the relevant author entry from the list.
    • Avoiding manual work when the selected list of values change: When the set of predefined choices constantly undergoes a change, use a Reference field instead of a Select field. For example, if a store manager constantly updates a list of store locations with newly added stores, a Reference field helps simply select the store location from the referred entry list.

Select Field

  • Select field allows choosing from two or more predefined choices
  • On the entry page, the options of the Select field can be displayed as either dropdown or radio buttons
  • When an option is selected, it stores the actual value of the selected option in the backend
  • It is recommended to use when the choices are predefined and are not likely to change
  • Examples of usage:
    • “Gender” field in a survey form
    • “Age Group” field in a form

Tags

  • Commonly used to add tags to an entry
  • The applied tags are visible on the entry list page
  • Use tags if you plan to search entries by tags using Contentstack’s Advanced Search
  • Not recommended if you wish to retrieve entries (by filtering) using APIs

Recommendations

  • To categorize similar entries for easy retrieval later using API queries, we suggest using Reference field (marked as multiple) instead of Tags.
  • Use Reference fields for fields such as Categories, Author, Navigation.
  • Use Select field when the options are predefined and are not likely to change. Any changes require a developer to constantly update the content type.
  • Avoid Tags, unless you want to search entries by tags using Contentstack’s Advanced Search.

Was this article helpful?

Thanks for your feedbackSmile-icon

On This Page

top-arrow