Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For 2.x we should move the inline forms to modal dialogs.
This was Bojhan's recommendation and I agree that it will provide a more obvious workflow.
This is obviously going to be a huge task, hence it's postponed until we decide to open the 2.x branch.
Comment | File | Size | Author |
---|---|---|---|
#21 | nesting.png | 496.19 KB | johnwebdev |
Comments
Comment #1
rogical CreditAttribution: rogical commentedGood idea, I'm interested on this.
Comment #2
DamienMcKennaThat would make this module a near 100% duplicate of references_dialog.
Comment #3
bojanz CreditAttribution: bojanz commentedNo.
Please see #1558120: Investigate joining forces with inline entity form.
(My comment in http://drupal.org/node/1558120#comment-6908728 compares IEF to the other mentioned solutions)
Comment #4
DamienMcKennaMy main complaint with the plan for v2 is that it doesn't make sense for the module's name to be Inline Entity Form if the subform is not inline :) Making it a configurable option would be the best approach, IMHO.
Comment #5
bojanz CreditAttribution: bojanz commentedThat would require doubling the module codebase so it's not viable.
The list of entities still remains inline, and in this case meaning "inline = on another entity's form", so I have no problem with the name, but in any case, we could easily bikeshed the name if we had any code. And that won't be happening soon ;)
Comment #6
havran CreditAttribution: havran commentedI'm too intersted for this solution. For now there is posibility lost data if user chose edit referenced node and save parent node without saving referenced node.
Comment #7
jweirather CreditAttribution: jweirather commentedIs there any ETA on modals? I'm happy to pitch in however I can.
In the meantime, is there any kind of workaround? I'm assuming it's more than just adding a "colorbox-load" or "ctools-use-modal" class to the buttons.
This would be a huge UI improvement for my use cases, so you have my undivided attention if you need it.
Please and thank you!
Comment #8
NancyDruMy customer desperately wants a particular node type to edit in a modal window, so I've been looking all over Drupal. This is a very common request and has been nearly accomplished. The problem seems to be that if anything inside the modal box is also Ajax'ed, then either that thing or the modal box provider get confused and break. If you can fix this issue you will be doing the Drupal world a major favor.
Comment #9
nithinkolekar CreditAttribution: nithinkolekar commented@NancyDru
I think entity connect is what you can try and it is working fine with dev version. You can edit the referenced entity(ER field) using edit button which will be shown based on the configuration setting of that field.
feature req:
As for the inline entity form it would be great if it show two radio button
1. existing : which will show autocomplete or select list( view as source for large list)
2. new : show the form of reference type just as it is showing.
This could be like conditional widget just like conditional fields.
Comment #10
bojanz CreditAttribution: bojanz at Centarro commentedExploration of this problem (done by slashrsm and me) showed that modals aren't flexible enough for IEF because you can always have only one.
This means no nested IEFs, no possibility for an entity form to open a modal for their own purpose.
So sadly I'll have to mark this issue as "won't fix" and leave the modals to other contribs.
Comment #11
DamienMcKennaBTW someone just uploaded IEF_Dialog: https://www.drupal.org/project/ief_dialog
Comment #12
Alexandre360 CreditAttribution: Alexandre360 commentedHello,
Not sure if it's better to open a new issue or update this one.
As modal is now in Drupal 8 core, maybe it would be a good thing to add this support in IEF for D8 ?
Comment #13
Olafski(#2)
Well, maybe sort of, but until now, there are no plans for a D8 version of References Dialog, see this issue.
(#10)
Are you generally speaking? With References Dialog 7.x you can use nested modals very well.
@DamienMcKenna and @bojanz, your comments refer to IEF 7.x. What do you think about modal dialogs in 8.x?
Comment #14
bojanz CreditAttribution: bojanz at Centarro commentedOn the table for 8.x-2.x: #3051990: Refactor IEF based on Commerce InlineForm API improvements as a 4.x major version.
Comment #15
geek-merlinSee also #1881616-10: Move the inline forms (add, edit, remove, reference existing) to modals:
Comment #16
geek-merlinIn #3051990-4: Refactor IEF based on Commerce InlineForm API improvements as a 4.x major version @bojanz clarified about modals and nested subforms:
Thanks for clarifying! I'll definitely keep this in mind when working on the other things. Some thoughts...:
UX-wise i like the idea of a modal, too. OTOH i'm a quite hesitant of cutting off support for nested use cases.
Maybe we can (like entity_embed) let people choose between modal and iframe (which should not be a problem to nest) and only have minimal variation in code paths between these alternatives. (We even might replace the iframe with a server-side subrequest.)
I do grok that the modal being populated in a separate request does not play well with the current inner working of FormState. I remember digging in entity_embed and AFAIR that too leverages Tempstore. But i too remember quite some PITA when a contrib module wants to hook into that form/subform communication (for things that are simple in embedded forms, so let's be prepared for some headaches with this.
In any case, what we (IEF) and entity_embed (and maybe others) essentially do is a variant of FormState that plays well with subforms in separate requests, so my strong gut feeling is it's worth giving this some conceptual thought and work together on abstracting this ("FormState NG plus SubformNG").
Comment #17
geek-merlinComment #18
johnwebdev CreditAttribution: johnwebdev commentedIsn't the Entity Embed Modal plugin still just a modal with a iFrame within?
Comment #19
joachim CreditAttribution: joachim commented> OTOH i'm a quite hesitant of cutting off support for nested use cases.
We use nested IEFs on my current project. I've used them elsewhere before too.
Comment #20
geek-merlinWe also use nested IEFs quite a lot. I wonder how hard #2741877: Nested modals don't work: opening a modal from a modal closes the original is.
Comment #21
johnwebdev CreditAttribution: johnwebdev commented#20 We've solved that problem in Layout Builder Modal module.
On the image above we can see that there are three types of dialogs rendered. The off canvas in the background, the Layout Builder Modal modal dialog and then the CKEditor image dialog.
Our solution (which I believe was first found in that linked issue from you) is that we use dialog as dialog type instead and then use the modal option for that dialog type. https://api.jqueryui.com/dialog/#option-modal
There are some outstanding issues like:
#3065095: CKEditor native dialogs not clickable inside of jQuery UI dialogs - There is a failing patch and work-arounds available
#3075236: jQuery UI dialog modals repositions incorrectly on window resize when there is a off canvas rendered - Might not be applicable for IEF's use case though