Dependent fields with ECA

Created on 12 September 2023, over 1 year ago
Updated 12 June 2024, 6 months ago

Problem/Motivation

I almost fully replaced Business Rules with ECA, however missing one functionality and wondering if it is possible to achieve it with this module.

Is it possible to use dependent functionality so for example if you choose Country "Germany" in another field called "Towns" the values of select list will be updateted based on Country so I can select only towns from Germany ?

Business Rules has good manual here dependent-field β†’ how to achieve it.

It is basicly using views and in entity reference field there is an option in Reference Method called "Business rules - dependent using views". Here with ECA I can see also option "Event-based selection with ECA" but I am not sure how to use it. Is it possible to achieve the same with ECA ??

I found also ECA issue 3350438 πŸ’¬ Event like: "Field value has changed" to control state of other fields of the entity, while creating / editing entity Fixed but it is related to Conditional fields only which do not supoort dependent fields.

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia coaston

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

Comments & Activities

  • Issue created by @coaston
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    This is currently not yet possible. However, it has been raised in a different context recently, and we may well add something in the future. It's important to recognize the difference that events for are being dispatched in the backend, so that ECA can subscribe to them and take some action. What this issue is all about, are events that occur in the frontend. So, what may be an extension to ECA at some point is a framework that allows to recognize frontend-events and dispatch a backend event from them. This will then also require a framework to allow the backend to trigger some actions in the frontend as a response to such events. Maybe the already existing ajax commands are sufficient for that.

    Not really related, but since you also raised that question, the "Event-based selection with ECA" is an event that gets dispatched during auto-complete activity, where an entity reference field in the frontend requests a list of matching entities from the backend. With that event, ECA can hook into that process and alter the result.

  • πŸ‡ΈπŸ‡°Slovakia coaston

    Thank you for your answer. I hope one day there will be such feature available as it seems i am not the only one who would love to use sort of "dependent field".

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen
  • πŸ‡ΈπŸ‡°Slovakia coaston

    Does it mean there is any progress?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Progress so far is that we're getting ready for ECA 2.0 next week, so that new features will be going into the 2.1 branch. That's what today's update of this issue was about.

    When we will get into implementing new features depends on a lot of things, e.g. how important is it to how many users, is there any funding, do we have resources who are willing to work on this on their own time, etc.

Production build 0.71.5 2024