Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Field States UI

2,547 sites Security covered
View on drupal.org

This module provides a user-friendly interface for configuring the Field States API, allowing site builders to control field visibility and behavior based on the values of other fields. This makes it easier to create dynamic forms without needing to write custom PHP code.

Field States UI allows sites builders with minimal PHP/Dev skills to configure the Field States API. This lets you configure a field to for example hide if another field has a certain value or hasn't been filled. While doing it via PHP can be more powerful the UI can be very handy and speed development.

Requirements/Versions

This module requires no modules outside of Drupal core.

  • 3.x Recommended/Supported version. Requires Drupal 9.2+/10+.
  • 8.x-2.x Recommended version for old Drupal installs, but updating heartily recommended

Installation

Install as you would normally install a contributed Drupal module. For further
information, see
Installing Drupal Modules

Usage

Configure a field

  1. Configuration can be accessed per field instance wherever that field
    display is usually configured. For example fields on the Node type Article
    would be at /admin/structure/types/manage/article/form-display.
  2. Use the contextual gear icon to edit the field.
  3. There is now a Manage Fields States fieldset, select a new state, configure,
    click 'Add' and Save.
  4. Save the Form Display

Field Types/Widgets

Due to various array structures, specific widgets/fields need to handled
specifically for each field at least. Many fields are the same structure
for all widgets and are not documented except in the code. Unrecognized
widgets and field types will attempt to be handled but some will be logged
to the dblog in cases that Field States UI is unsure. Please report those
to the issue queue.
Currently more than 50 field widgets covering more than 30 fields type from
core and various contrib modules are supported.

FAQ

Any questions? Ask away on the issue queue or email: Nick Dickinson-Wilde - [email protected].

Activity

Total releases
1
First release
Sep 2025
Latest release
9 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
4.x-dev Dev Sep 29, 2025