On user defined nodes the "Exclude node title" form element should be in the sidebar and appear on the form mode page to allow to change its order.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2924911-ent-support-for-ief-11.patch | 7.25 KB | steyep |
| #10 | 2924911-ent-support-for-ief-10.patch | 7.96 KB | steyep |
| #4 | Form display config.png | 217.3 KB | vaccinemedia |
| #4 | Node add form.png | 247.38 KB | vaccinemedia |
Comments
Comment #2
vaccinemedia commentedI totally agree - maybe not in the sidebar but definitely in the form display settings. I have for example, a content type which in the form display is split up using horizontal tabs into easier to manage chunks i.e. Main content, hero content, sidebar content etc... The exclude node title checkbox is currently appearing outside of these tabs at the bottom of the form. It would be nice to have the ability to move it to just underneath the title field OR (and maybe better still) simply have it as part of the title field.
Comment #3
chandeepkhosa commented@vaccinemedia It does currently show up in the form display and directly under title :) I am closing this issue
Comment #4
vaccinemedia commentedI believe the issue here is that the exclude node title checkbox is not a part of the rest of the entity / node fields. For example I have attached two screen grabs. One is the node add / edit display and the other is the config for the same content type's form display.
As you can see on the form's config there are field groups which have been added as horizontal tabs to break the form into smaller chunks.
On the node add form, the exclude node title form element is outside of the field group / tab and appears at the bottom of the form - detached from the title which it is affecting. Looking at the form display / config there is no way to drag the exclude node title form element into the first tab. The checkbox does not (and cannot by way of config) appear in the publishing options in the right sidebar either.
Ideally the checkbox would appear with the publishing options or be a form element on the form display which can be moved.
Comment #5
joshua.boltz commentedI've also recently come across this, where i expected to see the "Exclude title from display" checkbox on a node form. I DO see the checkbox on the node add and node edit forms, which i expect because i have done the user-defined configuration work at /admin/config/content/exclude-node-title.
But, where i'm, not seeing the checkbox is on the node form when loaded via inline entity form, such as a paragraph that has an entity reference field to node bundles. When a user can create a new node in the IEF, there is no checkbox.
I believe it's not there because of this code
in exclude_node_title.module around like 190.
I think there needs to be a check
And then access the node form that's loaded within that and then apply the same adding the checkbox form element as it's doing
Comment #6
steyep commentedI had the issue when using Exclude Node Title with Inline Entity Form. The field was not displaying because of the module only supports NodeForm form objects.
I have attached a patch that adds support for Inline Entity Form and other form display modes. The patch adds a computed field and dynamically attaches that to the user-editable content types. The field handles the permission checks and a prepare_form hook is used to determine if the title should be suppressed for the node form. This is useful because it sidesteps the need to get the entity from the NodeForm object.
Comment #7
steyep commentedBased on the work done in #6, I have made some slight modifications to support configuring the position of the Exclude Node Title on the Form Display UI.
Patch attached.
Comment #8
steyep commentedRe-rolled the patch to account for the proper field widget name
Comment #9
steyep commentedRe-rolled the patch from #7 to account for the proper field widget name
Comment #10
steyep commentedAdds blank line to bottom of the patch
Comment #11
steyep commentedAdds blank line to bottom of the patch
Comment #12
smustgrave commentedlets add some test coverage for this change.