- Issue created by @tonka67
- 🇩🇪Germany jurgenhaas Gottmadingen
When you say "contact form fields set up in Views", what exactly does that mean? Views is about displaying data, not really to build forms.
And in general, ECA is a processor to work on the backend. When your request is about dependant fields in the frontend, that's not really what ECA is built for. Such conditions are best addressed with javascript solutions. One way of getting javascript in the browser to change field values or visibility depending on changed values of other fields, is the Drupal state feature of the form API. You would have to add all the necessary state properties to the form with the
Build form
event.However, if that's your requirement, you may consider looking into the conditional fields → module, as this is doing that task just perfectly.
- Status changed to Postponed: needs info
over 1 year ago 9:40am 30 June 2023 I'm not looking to affect visibility. Rather, I have one field whose display values are dependent on another. For examples:
Field 1 (Categories): Cars / Apples /Horses
Field 2 (Items): Honda / Toyota / Granny Smith /Fuji / Arabian / PonyWhen Field 1 is set to a category, only the items relating to that category are displayed.
Business Rules does this, but it's already several years old and doesn't work properly. Dependent fields only works with select fields, which isn't useful.
I was hoping there might be some way to accomplish this in ECA instead. For example, when Field 1 is changed, send the new value as an argument to the entity reference field in Field 2, then refresh the view to get the updated value?
- Status changed to Active
over 1 year ago 11:50am 10 July 2023 - 🇩🇪Germany jurgenhaas Gottmadingen
I don't think, ECA can already do that. It may be possible to add something like that, and I'm changing this to a feature request, in case anybody were to pick this up and wanted to prove an MR.
- Status changed to Postponed: needs info
26 days ago 5:45pm 28 January 2025 - 🇩🇪Germany jurgenhaas Gottmadingen
@tonka67 we have now all ajax commands from Drupal core implemented in the eca_endpoint sub-module. We've used that ourselves to build intensive interaction between frontend and backend, with great success. Do you want to give this a try too?
Thanks @jurgenhaas. I'll try to find some time to play around with it in the next week or so.
- 🇩🇪Germany jurgenhaas Gottmadingen
Marking as fixed, please open a new issue if anything is missing.