I'm currently using a custom entity type with Group, and I've been having a look at gnode module for code examples.

I'm wondering if there's a way to add a new node with a single form, rather than the current 2-step process. When there are no fields on the GroupContent node, the user is presented with a form that has nothing but a button, which is potentially confusing.

Could GroupNodeFormStep1 override the form submit, and create the GroupContent entity at that point?

Comments

joachim created an issue. See original summary.

kristiaanvandeneynde’s picture

I think I explained this in another issue already, but they key take-away is that this will be in the 1.0 release. See #2693167: [meta] D8 release roadmap: "Plugin config: GroupContentType specific - skip form when no fields are configured".

That task will allow you to skip the "fieldable relationship" part of adding entities to a group if there are no forms configured. This will also be configurable with a checkbox on the forms introduced by #2693223: Plugins: Move installation (config form) and uninstallation to forms

kristiaanvandeneynde’s picture

Status: Active » Fixed

This was fixed a while back because you can now add an informational description atop the second wizard form. We chose not to allow you to skip this step because:

  • We'd have to load the 2nd step in the 1st one to determine whether it has any accessible fields
  • It would imply other GroupContent forms would/could also auto-submit, meaning we'd be open to clickjacking attacks (generating tokens for every link would make caching impossible)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.