Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Conditional Fields

Security covered Under active development 66,473 sites

This module allows you to show or hide fields, or change their behavior, based on the values of other fields. For example, you can have a checkbox that, when checked, reveals a text field for a summary.

Conditional Fields is an admin user interface with the ability to modify fields appearance and behavior on certain conditions when viewing content defined by dependencies between fields based on their states and values.

Details

Conditional Fields allows you to manage sets of dependencies between fields. When a field is “dependent”, it will only be available for editing and displayed if the state of the “dependee” field matches the right condition. When editing a node (or any other entity type that supports fields, like users and categories and custom entities like build by ECK), the dependent fields are dynamically modified with the States API. A simple use case would be defining a custom “Article teaser" field that is shown only if a "Has teaser" checkbox is checked. Or a boolean field, which if checked, makes another field invisible. But much more options are available.

Reach out at us on Drupal Slack #conditional_fields.

Installation and Usage

The dependency definitions can be made under admin/structure/conditional_fields and in case to entity type Node (Content type) an additional tab "conditional fields" is avaible under "Manage Display". For custom entities it is recommended to use the default admin/structure/conditional_fields admin settings path.

Requirements

Conditional fields has no third-party dependencies and works with core State API. But since it works on fields, some field and entity types need to be enabled.

Any help for the upcoming final 4.0 release is welcome: #2830988: [meta] 4.0.0 release roadmap

Active maintainers

dqd
heddn
colan

Similar Modules

  • Business Rules: There is some overlap with this module, but the architectures and designs are quite different. For more information, see #2913096: Business Rules module's "Dependent fields" feature: overlap discussion.
  • Field States UI which rather works directly on the field form widget under the settings wheel icon on each field. These settings can behave complicated since these forms introduce different ajax states and it misses a good overview of all field groups with dependencies like conditional_fields provide under admin/structure/conditional_fields

Reach out at us on Drupal Slack #conditional_fields.

Ask your assistant about Conditional Fields

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
5
Tracked since
Feb 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
4.0.0-alpha6 Pre-release 9–11 Dec 11, 2024
4.0.0-alpha5 Pre-release 8–10 Sep 27, 2023
4.0.0-alpha4 Pre-release 8–10 Sep 27, 2023
4.0.0-alpha3 Pre-release 8–10 May 10, 2023
4.0.0-alpha2 Pre-release 8–10 Feb 24, 2023