Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Release: Mautic Audiences 1.1.5 — Minor update available for module mautic_audiences (1.1.5). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: RightUp 1.0.2 — Minor update available for module rightup (1.0.2). Release: CronWatch 0.12.1 — Minor update available for module cronwatch (0.12.1). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Normally the field formatter, for an entity view display, is pre-configured by the site builder. While editing content, the user, can't make a decision on how a specific field is formatted. The module allows the user to pick up a formatter preset while editing content, so that they can decide, how to format a given field. A formatter preset consist from formatter plugin ID and its settings.

Presets are created by the site builder. The user doesn't have to understand the internals and details of configuring a formatter. This is an advantage over Formatted Field module, where the editor, in the entity edit form, picks up directly the formatter and has to configure the plugin settings, which requires advanced knowledge. With this module every formatter is pre-configured and stored in a preset with a nice, friendly, and a meaningful label that the user picks up while editing content.

This module is the successor of Formatter Field Preset, which used to work with Drupal 7. But unlike its predecessor, it has no dependency on Formatted Field.

The User Selected Formatter UI (user_selected_formatter_ui) submodule, allows a site builder to manage the presets from the UI.

Usage

As a site builder

  • Enable User Selected Formatter UI (user_selected_formatter_ui) submodule
  • Add a new field of type "User Selected Formatter Preset" in the entity bundle where the field to be formatted lives. In the new field settings point to the field that you want to format and save.
  • Make sure this field is exposed in the form display.
  • Visit the edit form of the field that you want to format. You'll notice a new "Format presets" tab, right next to "Edit" tab.
  • Click "Format presets" and, using the "Add preset" button, start adding formatting presets.
    • Fill in the label of the preset. Note that this label is shown to the user, so it's important to be meaningful.
    • Choose field label display mode.
    • Select the formatter to be used for this preset and, after filling the plugin configuration, save the preset.
    • Add as many presets you like to let the user choose from.
  • Use the "User selected formatter" for the field you want to format.

As an editor

When an editor edits the content, they can choose the pre-configured formatter in order to expose the formatted field.

Production

In production, the User Selected Formatter UI (user_selected_formatter_ui) submodule can be disabled.

Architecture

Presets are stored in the third-party settings of the field that needs to be formatted.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Aug 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0-alpha1 Pre-release Aug 9, 2024
1.x-dev Dev Aug 9, 2024