The fact that complex IEFs are rendered in a table cell means the additional fieldset wrapper seems completely superfluous and often visually annoying. It can be easily overridden using the CSS rule display: contents, however in most usecases it will be unwished for, so it should go.
Even for simple IEFs a fieldset isn't necessarily wanted. To provide a seamless integration of the IEF, sitebuilders may not want any visual separation. Or they might want to put the IEF in a vertical tab instead. The only difference is that in the basic usecase a fieldset helps understanding how the IEF works.
Initially I didn't want to add yet another setting, being rather in favor of referring sitebuilders to the Field group module that allows all kinds of fancy fieldsets, vertical tabs etc. However, it would be a bit irritating to force it for simple IEFs (though sitebuilder might want to get rid of it), yet do away with it for complex IEFs. Also, we're in RC phase, so we don't want to remove any functionality.
Therefore I am adding another setting, though using #states to expose only relevant settings. Default for simple IEFs would be "on", default for complex ones "off."
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | ief_allow_seamless_integration-3030273-10.patch | 5.91 KB | ershov.andrey |
| #7 | ief_allow_seamless_integration-3030273-7.patch | 5.91 KB | nevergone |
| #2 | ief_allow_seamless_integration-3030273-2.patch | 5.7 KB | pancho |
Issue fork inline_entity_form-3030273
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
panchoHere's a patch (no tests yet) and some screenshots:
with some other fields in a fieldgroup
Comment #3
nevergoneI'm tested and works well! Thanks!
Comment #4
neeravbm commentedI just installed the patch. It works as expected but I am not sure whether this configuration is really needed in the module.
Comment #5
extect commentedPatch is working for me as well. Any chance to get this committed?
Comment #6
joachim commentedOverall I'm a bit wary about adding yet more configuration options... at least I don't think these will affect form functionality.
Negative labels are generally a bad idea, because the user has to think about a double-negative when the checkbox is unchecked: 'don't hide == show'.
However here we have the problem that the default behaviour is to show, so to make the checkbox a positive, we'd need to enable the property in existing fields with an update hook.
What does it mean if you hide the fieldset but show the title? Where does the title go?
I don't really like this pattern of setting the #type then changing it later.
Clearer to either set it in one go, or don't set it here and set it for all cases further down.
Same here.
Comment #7
nevergonepatch re-rolled (rc9)
Comment #8
jasmina4w commentedIn modules/contrib/inline_entity_form/inline_entity_form.api.php, you have hook_inline_entity_form_entity_form_alter. With this you could add your #attached.
Comment #9
socialnicheguru commentedThere is always the option to come up with a form view mode for the entity in question that will hide the fields that you want and be used with IEF.
Comment #10
ershov.andrey commentedUpdated patch for 8.x-1.0-rc14
Comment #12
podaroktnx
Comment #14
geek-merlinBulk reopen.
Comment #15
geek-merlinSounds reasonable. Needs tests though.
Comment #18
facine commentedI've created a MR porting the these changes, but we still need tests.
Comment #19
tvalimaa commented#17 MR changes are looking to work. Thank you.