drupal/eca_starterkit

This recipe provides a quick-start setup for ECA with the recommended models being downloaded and installed.

Maintainers

Package info

git.drupalcode.org/project/eca_starterkit.git

Type:drupal-recipe

pkg:composer/drupal/eca_starterkit

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

1.0.0-beta1 2026-03-13 16:53 UTC

This package is auto-updated.

Last update: 2026-03-13 16:09:26 UTC


README

This recipe provides a quick-start setup for ECA (Events - Conditions - Actions) together with the new Workflow Modeler -- a modern, React Flow-based visual editor for building ECA models by drag-and-drop.

Why use this recipe?

Setting up ECA manually means choosing which sub-modules to enable, installing the modeler stack, and figuring out how the pieces fit together. The Starterkit does all of that in a single command:

  • Installs the recommended set of 20 modules covering the full ECA ecosystem, so you can start building workflows right away without going back to enable modules you missed.
  • Sets up the new Workflow Modeler (including the Modeler API), giving you a visual canvas where you can drag, drop, and connect events, conditions, and actions -- no YAML editing required.
  • Ships a working demo model that customises the user registration form, so you can open the modeler immediately and see a real ECA model in action rather than staring at an empty screen.

What gets installed

ECA core sub-modules

ModulePurpose
eca_accessAccess control events and conditions
eca_baseFoundation actions (tokens, lists, scalars, logging, etc.)
eca_cacheCache invalidation and rebuilding
eca_configConfiguration entity operations
eca_contentContent entity CRUD events and actions
eca_endpointCustom route / endpoint handling
eca_fileFile and media operations
eca_formForm build, alter, validate, and submit handling
eca_logLogging actions
eca_menuMenu link events and actions
eca_miscMiscellaneous utilities
eca_queueQueue processing
eca_renderRender and display operations
eca_uiMakes ECA a model owner for the Modeler API
eca_userUser-related events and actions
eca_viewsViews integration

Extension modules

ModulePurpose
eca_tamperTamper plugins as ECA actions (explode, string length, find/replace, etc.)
eca_toolEvents and actions for the Drupal Tool API

Modeler stack

ModulePurpose
modeler_apiFramework that connects model owners (ECA) with visual modelers
modelerThe Workflow Modeler -- a React Flow canvas with drag-and-drop, undo/redo, search, dark mode, execution replay, live testing, and export to recipes, archives, JSON, or SVG

In-place customization

One of the standout features enabled by this recipe is in-place customization -- the ability to customize any Drupal form directly on the form page itself, without opening the modeler or writing code.

How it works

The eca_form module ships a set of form templates: reusable ECA patterns with configurable placeholders. When an authorized user (with the modeler api edit eca permission) visits a page containing a form, the template system activates:

  1. Focus a form field -- a lightning-bolt icon appears next to it.
  2. Click the icon -- a popup lists all available customizations for that field type (e.g., "Set label", "Set max length", "Hide this field").
  3. Configure and save -- fill in the values, check "Apply this template", and click Save. The system creates a fully functional ECA model behind the scenes -- no modeler interaction needed.

Returning to the same form later shows a checkmark on templates that were already applied, with the previous values pre-populated so you can adjust them.

Available form templates

TemplateWhat it does
Set labelChange a field's label
Set default valuePre-fill a field with a default
Set max lengthValidate that a text field does not exceed a character limit
Hide this fieldCompletely hide a single field
Hide fields when selectedMake fields invisible when a checkbox is checked
Show fields when selectedMake fields visible when a checkbox is checked
Disable this fieldDisable a single field
Enable this fieldEnable a previously disabled field
Require this fieldMake an optional field required
Make field optionalMake a required field optional
Disable fields for certain valueDisable fields when a select dropdown matches a value
Set field value to selected indexCopy a select dropdown's selection into another field

These templates work on any Drupal form, not just the forms you build yourself. This makes in-place customization a powerful tool for tailoring admin forms, contrib module forms, and user-facing forms alike.

Demo model: User Registration Form

The recipe ships a ready-to-use ECA model (form_user_register_form) that was built entirely through in-place customization on the user registration form. It demonstrates three common form-manipulation patterns:

  1. Relabelling fields -- Changes the "Email address" label to "E-Mail" and the "Username" label to "Name".
  2. Conditionally hiding fields -- Hides the notification, preferred language, and timezone fields when the "Administrator" role checkbox is selected (using a loop over a list of field names).
  3. Custom validation -- Rejects the name field if its length exceeds 10 characters.

Open this model in the Workflow Modeler after installation to see the resulting ECA model, or visit /user/register and click into a form field to try in-place customization yourself.

Requirements

  • Drupal 11.3 or later
  • ECA 3.1 or later

Installation

# Require the recipe and its dependencies
composer require drupal/eca_starterkit

# Apply the recipe with Drush (version 13 or later)
drush recipe ../recipes/eca_starterkit

# Or apply without Drush
cd web && php core/scripts/drupal recipe ../recipes/eca_starterkit

After applying the recipe, navigate to Administration > Configuration > Workflow > ECA to see the installed model and open the Workflow Modeler.