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
- 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
. - Use the contextual gear icon to edit the field.
- There is now a Manage Fields States fieldset, select a new state, configure,
click 'Add' and Save. - 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.
- Core fields - 22 fields
- Address - 3 field types
- Chosen - 1 field widget
- Color Field - 1 field type
- Entity Reference Revisions - 1 field type
- Geofield - 1 field type
- Inline Entity Form - 3 field widgets
- Layout Fields - 1 field widget
- Markup - 1 field type
- Paragraphs - 2 field widgets
- Smart Date - 1 field type
- Select2 - 2 field widgets
- ViewsReference - 1 field type
- Webform - 1 field type
- Youtube - 1 field type
FAQ
Any questions? Ask away on the issue queue or email: Nick Dickinson-Wilde - nick@nickdickinsonwilde.ca.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Module categories: Administration Tools, Content Editing Experience, Site Structure
- 2,987 sites report using this module
- Created by NickDickinsonWilde on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.