This project is not covered by Drupal’s security advisory policy.

The Conditions module provides reusable form elements, a field type, and services for working with Drupal's condition plugins — the same plugin type used for block visibility (request path, language, user role, and many more provided by core and contrib).

It lets site builders expose condition configuration to content editors directly on any form or field, and lets developers evaluate those conditions at runtime to decide what to show, where, and to whom.

Features

  • conditions form element — renders a configurable list of condition plugins with AND/OR logic
  • conditions_groups form element — renders multiple groups of conditions, each with its own logic and a published/unpublished toggle
  • ConditionsService — initializes condition plugins (including context mapping) and resolves nested condition groups at runtime
  • conditions_field sub-module — a field type that stores conditions as one row per condition (indexed by plugin ID), so entities can be queried efficiently by the conditions assigned to them
  • ConditionsFieldService — bulk lookups of condition data by entity ID or by condition configuration
  • AJAX-enabled widgets for managing condition groups directly on entity edit forms

Requirements

Getting started

The base module provides no admin UI of its own — integrate the conditions/conditions_groups form elements in your own forms, or enable the conditions_field sub-module to add a "Conditions" field to any entity type via the Field UI.

Supporting organizations: 
Development and maintenance

Project information

Releases