Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Conditional Fields

67,008 sites Security covered
View on drupal.org

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.

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

Releases

Version Type Core Release date
4.0.0-alpha6 Pre-release 9–11 Dec 11, 2024