Hide format info (former Allowed Formats)

Hides text format help and guidelines on text fields. The original 'allowed formats' functionality has been moved to Drupal core since version 10.1.0.

allowed_formats
52,186 sites
108
drupal.org

Install

Drupal 11, 10 v3.0.1
composer require 'drupal/allowed_formats:^3.0'
Drupal 9 v2.0.0
composer require 'drupal/allowed_formats:^2.0'
Drupal 8 v8.x-1.5
composer require 'drupal/allowed_formats:8.x-1.5'

Overview

The Allowed Formats module has evolved significantly since its inception. Originally, it provided the ability to limit which text formats are available for each text field instance. However, since Drupal 10.1.0, this core functionality has been integrated directly into Drupal core.

In the 3.x branch, the module now focuses on two key areas: First, it provides a migration path for existing sites to convert their allowed format configurations from the module's third-party settings to Drupal core's native field settings. Second, it offers a feature that allows site builders to hide the text format help link ("About text formats") and format guidelines that typically appear below formatted text fields.

The module works by adding third-party settings to text field widgets, which can be configured through the field widget settings form. When enabled, these settings remove the format help and guidelines from the rendered form element, providing a cleaner interface for end users who don't need to see format information.

Features

  • Hide the 'About text formats' help link on formatted text fields
  • Hide text format guidelines/descriptions below text areas
  • Automatic migration of allowed formats configuration from older module versions to Drupal 10.1+ core format
  • Backward compatibility handling during field configuration saves
  • Support for all formatted text field types: text, text_long, and text_with_summary

Use Cases

Simplify text field interface for content editors

Site builders can use this module to hide the 'About text formats' help link and format guidelines on text fields. This is particularly useful when content editors are trained on a specific format and don't need to see format selection options or guidelines, resulting in a cleaner, less cluttered editing interface.

Migrate from older Allowed Formats versions

Sites that used the 1.x or 2.x versions of the module to restrict text formats per field can use the 3.x version to automatically migrate those settings to Drupal core's native allowed_formats field setting. The migration happens automatically during database updates and when field configurations are saved.

Hide format information on single-format fields

When a text field is configured to allow only one text format, the format selector and guidelines become unnecessary. This module can hide that information, making the form cleaner while still preserving the field's format restrictions configured in core.

Reduce visual noise on complex forms

On content types with multiple formatted text fields, the repeated format help and guidelines can create visual clutter. Site administrators can enable the hide options on each field widget to streamline the editing experience.

Tips

  • The hide settings are configured per field widget, not globally. Each text field can have different hide settings.
  • When only one format is allowed and both help and guidelines are hidden, the module also removes the wrapper container for a completely clean interface.
  • The module automatically handles migration during field_config presave, so manual migration is not required for most operations.
  • Consider using this module in combination with Drupal core's allowed_formats field setting to both restrict formats AND hide the format interface.

Technical Details

Hooks 3
hook_field_widget_third_party_settings_form

Adds checkbox settings to text field widgets for hiding format help and guidelines

hook_field_widget_single_element_form_alter

Alters text field widget form elements to apply hide settings via an #after_build callback

hook_ENTITY_TYPE_presave (field_config)

Converts legacy allowed formats third-party settings to Drupal core field settings when a field configuration is saved

Troubleshooting 4
Settings don't appear in field widget configuration

Ensure you are editing a text-based field (text, text_long, or text_with_summary). The module only adds settings to these field types. Navigate to Structure > Content types > [Type] > Manage form display, click the gear icon for the text field widget.

Format help and guidelines still visible after enabling hide options

Clear the Drupal cache after changing settings. The form element alterations use #after_build callbacks which require a cache rebuild to take effect.

Legacy allowed formats not migrated to core

Run database updates via drush updb or through /update.php. The module provides post_update hooks that migrate legacy third-party settings to Drupal core's native format.

Module shows as incompatible

This module requires Drupal 10.1.0 or higher. If you're on an older version, use the 2.x branch of the module which provides the full allowed formats functionality.

Security Notes 3
  • This module has Drupal security advisory coverage, meaning security issues are reviewed and addressed by the Drupal Security Team.
  • Hiding format help and guidelines does not affect the actual format validation - unauthorized formats will still be rejected by the server.
  • The module does not bypass any permission checks; users still need appropriate permissions to use text formats.