Search by

drupal-eca-recipe / eca_lib_0028

jurgenhaas

Reads form field values during validation and submission, showing how to find the right token syntax for each field type and how building a temporary entity offers a clearer alternative.

Package info

gitlab.lakedrops.com/drupal/recipes/eca_lib_0028

Type:drupal-recipe

pkg:composer/drupal-eca-recipe/eca_lib_0028

Statistics

Installs: 78

Dependents: 0

Suggesters: 0

3.1.10 2026-09-17 08:22 UTC

This package is auto-updated.

Last update: 2026-09-17 08:23:08 UTC


README

ID: eca_lib_0028

This model demonstrates how to access form field values during validation or submission, how to find out the proper token syntax for each form field type, and also an alternative approach by building a temporary entity from form field values to use the more transparent entity token syntax.

The creation of this module was recorded and the video with additional explanations can be watch here.

Requirements

This recipe includes the library's article_content_type recipe, which provides the Article content type together with its body field. Drupal 11.4 removed that content type from the Standard profile and Drupal 12 removed core's recipe for it, so the library ships its own. Composer installs it alongside this recipe.

Installation

## Import recipe
composer require drupal-eca-recipe/eca_lib_0028

# Apply recipe with Drush (requires version 13 or later):
drush recipe ../recipes/eca_lib_0028

# Apply recipe without Drush:
cd web && php core/scripts/drupal recipe ../recipes/eca_lib_0028

# Rebuilding caches is optional, sometimes required:
drush cr