- Issue created by @mxh
- 🇩🇪Germany jurgenhaas Gottmadingen
Are paragraphs not embedded with inline_entity_form? Maybe we can extend support on that, so that this will be an enhancement for all sorts of embedded entities, not only paragraphs?
- 🇩🇪Germany mxh Offenburg
Paragraphs is not using IEF. Any module may add its own logic how to embed entity forms into other forms. Therefore I think it's not possible to find a "one-fits-all" solution here.
- 🇩🇪Germany mxh Offenburg
IEF currently also not really well supported, as can be seen here https://www.drupal.org/project/eca/issues/3348429#comment-14973259 📌 eca_form: Impossible or hard to identify an inline entity form Fixed
So we could at least try to cover IEF and Paragraphs.
- 🇩🇪Germany mxh Offenburg
Another idea that came up when discussing this internally: We may also provide additional events to react upon when an EntityFormDisplay handler is being invoked for
buildForm
. Such event would probably already cover IEF and Paragraphs at the same time, however it would be an additional event and we maybe need to decorate the FormBuilder service or even the EntityFormDisplay handlers. - Assigned to mxh
- 🇩🇪Germany mxh Offenburg
Trying to work on an approach as mentioned in #6.
- last update
over 1 year ago 286 pass - @mxh opened merge request.
- Issue was unassigned.
- 🇩🇪Germany mxh Offenburg
I had to do the following:
- Removed the Inline Entity Form related functionality as it was not working right. It was triggered on that hook but it then dispatched the event using the parent entity. Not what you'd expect and then it was wrongly dispatched for events that were intended for the parent entity but not for the entity of the inline entity form. So I had to remove it. And there is no update hook possible to move existing usages of that, because it cannot be differentiated between real intended parent events and inline events. So if anyone was using this, it was wrong anyway and needs to be manually adjusted then. Also remove that condition checking whether current form is inline entity form because it was using wrong circumstances.
- Reacted upon hooks that are fired up by inline_entity_form module widgets and paragraph widgets. Then had to add further logic for inline_entity_form for being able to work with the entity using latest submitted values. So further logic was written for it to achieve that.
- Introduced completely new event solely for Inline entity form building the form. It is dispatched for both inline_entity_form but as well for paragraphs. Despite paragraphs having nothing to do with inline_entity_form, that new event also works for that.
Created first MR for having a patch file.
Tests need to be added, and requires further manual testing.
- last update
over 1 year ago 286 pass - last update
over 1 year ago 286 pass - last update
over 1 year ago 287 pass - Status changed to Needs review
over 1 year ago 4:49pm 8 June 2023 - Status changed to RTBC
over 1 year ago 1:40pm 13 June 2023 - 🇩🇪Germany jurgenhaas Gottmadingen
This looks great, thanks @mxh for all your work on this.
- last update
over 1 year ago 287 pass -
jurgenhaas →
committed 11d0939f on 1.2.x authored by
mxh →
Issue #3363022 by mxh, jurgenhaas: eca_form: Find a better integration...
-
jurgenhaas →
committed 11d0939f on 1.2.x authored by
mxh →
- Status changed to Fixed
over 1 year ago 1:43pm 13 June 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 6:53am 6 September 2023 - 🇳🇵Nepal bibhor
Hi friends,
Since this is a discussion about the IEF, I am posting my request here. Please accept my apology if this is not the right place.I have trouble calculating values from the inline entity form fields and showing them on the parent form.
Using the Tamper:Math, I was able to calculate sub-totals within the inline forms as described by @jurgenhaas in this video.I wonder how to sum up the sub-total values from the IEFs and set it to the grand total field of the parent form using ECA.
- 🇩🇪Germany jurgenhaas Gottmadingen
Sorry @BibhOr this question almost got lost since the issue had been closed before. It's not really the best place to post "related" questions in existing issues, and certainly not in closed issues. Creating new issues is "free of charge", so don't hesitate to create new ones at any time. It's then easier for all of us to focus on that specific request, and later it will be easier for others to find that again, should anyone have a similar issue.
When you report your support request in a new issue, it would be helpful if you described how you've approached your solution, i.e. which event is being used and how you grab the values that you sum up into sub-totals and why that is difficult for the grand total then. In other words, what have you tried to make it work and where exactly lies the challenge. If it helps to explain, you can always upload a simplified ECA model that hopefully helps us to reproduce the issue and use it to build a solution together with you then.