eca_form: Action "Form: add Ajax handler" creates one nesting div element per Ajax trigger

Created on 22 July 2025, 11 days ago

Problem/Motivation

Action "Form: add Ajax handler" creates one nesting div element per Ajax trigger.

Steps to reproduce

  • Drupal installation with standard profile, install eca_form, eca_content and some other ECA sub-modules
  • Add a new select list options field to "page" content type called "field_myoptions". Add two options, for example "One" and "Two".
  • Create new ECA config, use "Build form" event for entity type "node" of bundle "page". Add an action as successor "Form: add ajax handler" for field name "field_myoptions" and set "Disable validation errors" to "Yes". Save this config.
  • Add a new "page" node via /node/add. Go to the edit page of the node. When selecting a value in "field_myoptions" you will notice that an Ajax throbber shows up as expected.

Now everytime the Ajax is triggered, the DOM creates another nested div element as a wrapper around the form (see attached screenshot).

Proposed resolution

The Ajax replacement method should probably be switched to replace instead of insert/html so that we don't get into possibly infinite nesting.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇩🇪Germany mxh Offenburg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024