---
url: 'https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/field-formatter'
title: 'Field formatter | DXPR'
author:
  name: Jurriaan
  url: 'https://dxpr.com/users/jurriaan'
date: '2023-11-06T07:12:06+00:00'
updated: '2026-10-26T18:01:04+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: "A field formatter is the Drupal plugin that turns a field's stored values into page output, such as plain text or the label of a referenced item."
tags:
  - 'Drupal glossary'
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-26T18:01:04+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': FAQPage
      mainEntity:
        -
          '@type': Question
          name: 'What is the difference between a field formatter and a field widget?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>The widget is the control on the edit form where an editor enters the data. The formatter produces the output when the entity is displayed. You set them on two different pages: Manage form display for widgets and Manage display for formatters.</p>'
        -
          '@type': Question
          name: 'Where do I change the formatter of a field?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>Go to Structure › Content types, open the menu beside the content type and choose Manage display. Pick the formatter in the drop-down for the field. A gear icon opens the formatter&#039;s settings when it has any.</p>'
        -
          '@type': Question
          name: 'Can a field use a different formatter in a teaser?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>Yes. Each view mode can use the default display settings or its own custom settings, and a field can have a different formatter in each view mode. Turn on custom settings for the view mode in the Custom display settings section of Manage display.</p>'
        -
          '@type': Question
          name: 'How do I hide only the label of a field?'
          acceptedAnswer:
            '@type': Answer
            text: '<p>On Manage display, choose Hidden in the Label column for that field. The formatter drop-down also has a Hidden choice, but that one removes the whole field from the view mode.</p>'
    -
      '@type': TechArticle
      headline: 'Field formatter'
      description: "A field formatter is the Drupal plugin that turns a field's stored values into page output, such as plain text or the label of a referenced item."
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2023-11-06T07:12:06+0000'
      dateModified: '2026-10-26T18:01:04+0000'
      author:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      mainEntityOfPage: 'https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/field-formatter'
      articleSection: 'Drupal glossary'
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/field-formatter'
      description: "A field formatter is the Drupal plugin that turns a field's stored values into page output, such as plain text or the label of a referenced item."
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Home
            item: 'https://dxpr.com/'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
      inLanguage: en
---
[Help Center](/hc)/[Documentation](/hc/documentation) /[Learn Drupal](/hc/documentation/learn-drupal) /[Drupal glossary](/hc/documentation/learn-drupal/drupal-glossary)

# Field formatter

A field formatter is the Drupal plugin that turns a field's stored values into page output, such as plain text or the label of a referenced item.

 Learn DrupalDrupal glossary Last updated October 26, 2026

## In this guide

Related terms

- [Field](/hc/documentation/learn-drupal/drupal-glossary/field)
- [Field widget](/hc/documentation/learn-drupal/drupal-glossary/field-widget)
- [Field API](/hc/documentation/learn-drupal/drupal-glossary/field-api)
- [Entity](/hc/documentation/learn-drupal/drupal-glossary/entity)
- [Teaser](/hc/documentation/learn-drupal/drupal-glossary/teaser)
- [Content type](/hc/documentation/learn-drupal/drupal-glossary/content-type)

 [All Drupal terms from A to Z](/hc/documentation/learn-drupal/drupal-glossary)

A field formatter is the part of a field that controls how its values are displayed when the entity is shown. You pick it per field and per view mode on the Manage display page. A long text field can be shown trimmed or in full, and a term reference as plain text or as a link, depending on the formatter.

## How field formatters work in Drupal 11

A [field](/hc/documentation/learn-drupal/drupal-glossary/field) has a type, and that type can name a default formatter. The Field UI lets a site builder choose another formatter that supports the type. For each view mode the page offers a Label setting (whether and how to show the label), a formatter drop-down, a gear icon for the formatter's settings, and a drag handle for the order of the fields. Choosing Hidden in the formatter drop-down, or dragging the field into the Disabled section, removes the field from that view mode.

In code, a formatter is a plugin:

- It carries the `FieldFormatter` attribute with an `id`, a `label` and a `field_types` list of the field types it supports.
- It implements `FormatterInterface`, usually by extending `FormatterBase`, and lives in `Drupal\{module}\Plugin\Field\FieldFormatter`.
- Its `viewElements()` method receives the field items and a language code and returns a render array with one child per value, keyed by consecutive numbers from 0. The `view()` method builds the fully themed field, including the label.
- `settingsForm()` and `settingsSummary()` provide the gear-icon form and the one-line summary. `isApplicable()` tells whether the formatter fits a given field definition.

Core examples: the `string` formatter (labeled Plain text) supports the `string` and `uri` field types and has a setting to link the output to the entity. The `entity_reference_label` formatter (labeled Label) displays the label of the referenced entities. Contributed modules can add more formatters. The [Field API](/hc/documentation/learn-drupal/drupal-glossary/field-api) describes the plugin system as a whole.

## Example

The Drupal User Guide improves the display of a Vendor content type. Go to `Structure › Content types`, open the menu beside Vendor and choose Manage display. In the Label column, select Hidden for Main image and Vendor URL. Click the gear icon of Vendor URL, clear the link text trimming and check Open link in new window. Click Update, reorder the fields, and click Save. The guide says to clear the cache if the changes do not appear.

## Common mistakes

- **Changing only the default display.** A view mode that uses custom settings ignores the default. Check the Custom display settings section and switch to the view mode you are looking at, such as [teaser](/hc/documentation/learn-drupal/drupal-glossary/teaser).
- **Mixing up the two Hidden options.** The Label setting hides the label; the formatter drop-down hides the field.
- **Looking for the setting on the edit form.** The edit form belongs to the widget. A formatter works on the output of the page.
- **Not seeing a change.** Clear the cache before concluding that the setting failed, as the user guide advises.

## For marketing and content teams

Formatters decide how the same content looks in different places: full in an article, shortened in a list. If a field shows too much, too little or the wrong label, the fix can be a formatter setting rather than a content edit. Ask your site builder to change it on Manage display. If no formatter produces the output you want, a developer can write one as a plugin.

## With DXPR

DXPR Builder is a field formatter. On Manage display you change the Format of a formatted text field, such as Body, from Default to DXPR Builder. After that, every item of the content type opens the visual builder for editors who have permission. The [setup guide](/hc/documentation/learn-dxpr-builder/getting-started/installing-on-existing-content-types) lists the steps. See [DXPR Builder](/drupal-layout-builder).

## Sources

- [Drupal User Guide: Concept: View Modes and Formatters](https://www.drupal.org/docs/user_guide/en/structure-view-modes.html)
- [Drupal User Guide: Changing Content Display](https://www.drupal.org/docs/user_guide/en/structure-content-display.html)
- [Drupal core 11.4.8: Field UI help text (FieldUiHooks.php)](https://git.drupalcode.org/project/drupal/-/blob/11.4.8/core/modules/field_ui/src/Hook/FieldUiHooks.php)
- [Drupal core 11.4.8: Field Formatter API topic (field.api.php)](https://git.drupalcode.org/project/drupal/-/blob/11.4.8/core/modules/field/field.api.php)
- [Drupal core 11.4.8: FormatterInterface](https://git.drupalcode.org/project/drupal/-/blob/11.4.8/core/lib/Drupal/Core/Field/FormatterInterface.php)
- [Drupal core 11.4.8: FieldFormatter attribute](https://git.drupalcode.org/project/drupal/-/blob/11.4.8/core/lib/Drupal/Core/Field/Attribute/FieldFormatter.php)
- [Drupal core 11.4.8: StringFormatter](https://git.drupalcode.org/project/drupal/-/blob/11.4.8/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php)
- [Drupal core 11.4.8: EntityReferenceLabelFormatter](https://git.drupalcode.org/project/drupal/-/blob/11.4.8/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceLabelFormatter.php)
- [DXPR Builder 3.0.0-beta23: DxprBuilderFormatter](https://git.drupalcode.org/project/dxpr_builder/-/blob/3.0.0-beta23/src/Plugin/Field/FieldFormatter/DxprBuilderFormatter.php)
- [DXPR Builder: Use DXPR Builder on your content types](/hc/documentation/learn-dxpr-builder/getting-started/installing-on-existing-content-types)

## Questions about Field formatter

### What is the difference between a field formatter and a field widget?

The widget is the control on the edit form where an editor enters the data. The formatter produces the output when the entity is displayed. You set them on two different pages: Manage form display for widgets and Manage display for formatters.

### Where do I change the formatter of a field?

Go to `Structure › Content types`, open the menu beside the content type and choose Manage display. Pick the formatter in the drop-down for the field. A gear icon opens the formatter's settings when it has any.

### Can a field use a different formatter in a teaser?

Yes. Each view mode can use the default display settings or its own custom settings, and a field can have a different formatter in each view mode. Turn on custom settings for the view mode in the Custom display settings section of Manage display.

### How do I hide only the label of a field?

On Manage display, choose Hidden in the Label column for that field. The formatter drop-down also has a Hidden choice, but that one removes the whole field from the view mode.

## Cite this definition

"Field formatter." DXPR Drupal glossary, https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/field-formatter. Last updated October 26, 2026.

 Copy

## Related terms

- [Field](/hc/documentation/learn-drupal/drupal-glossary/field)
- [Field widget](/hc/documentation/learn-drupal/drupal-glossary/field-widget)
- [Field API](/hc/documentation/learn-drupal/drupal-glossary/field-api)
- [Entity](/hc/documentation/learn-drupal/drupal-glossary/entity)
- [Teaser](/hc/documentation/learn-drupal/drupal-glossary/teaser)
- [Content type](/hc/documentation/learn-drupal/drupal-glossary/content-type)

[All Drupal terms from A to Z](/hc/documentation/learn-drupal/drupal-glossary)