Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Synopsis

This module allows developers to create computed fields via the Drupal Plugin API. It adds a field type named computed_render_array.

The idea behind this was to simplify and unify the way we code. We were inspired by https://www.drupal.org/project/extra_field. Now whether it is blocks, extra fields or computed fields, we can use plugins and less hooks.

Computed fields work a bit like extra fields but they are more flexible because you can still use the native field settings (including formatters).

You can use it to merge several fields as one in the display, or simply render a block, an entity...

For example, you have two link fields that you want to display in the same HTML block. You can create a computed field for that. You can still use your normal fields display if you want, it does not affect the original fields.

Another use case could be to render a block between your content fields. You could also decide to display the block according to another field value.

Requirements

No special requirements.

No specific recommendations, you can use this module as is.

Roadmap

This module is minimally maintained. It will be updated if needed but no further development is planned. It is currently compatible with D9.

Known problems

Layout Builder does not support extra fields or computed fields as a whole. See core issue or the issue in this module for updates, but at the moment it is not possible to use both together.

The core currently have an issue with computed fields (see https://www.drupal.org/project/drupal/issues/2932273). Before this can be fixed on the core level, we released a workaround on this module.

This module does not expose any UI, it is meant to be used as an API only, please check the documentation for more details.

Pledges

We pledge to avoid deprecated elements to ensure a smooth upgrade to Drupal 9.

Credits

Current maintainers:

  • Computed Field : This module provides database storage and a back office interface to create computed fields, with a set of field types.
    Our module only allows developers to create computed fields with the Plugin API like they would create a block for example. There is no database storage or user interface, and any type of field can be extended.

Dependencies

No dependency, this module works with the Drupal core.

Restrictions

No restrictions.

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
Jan 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.4 Stable Jan 10, 2024