Skip to content

[6.x] Forms 2: Group fields only contain form fields - #15968

Merged
jasonvarga merged 6 commits into
forms-2from
forms-2-fix-b3-group-children
Nov 19, 2026
Merged

jasonvarga merged 6 commits into
forms-2from
forms-2-fix-b3-group-children

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

Groups in forms offered every core fieldtype as a child (entries, bard, assets, …) and saved children as core types, while the rest of forms 2 assumed form fieldtypes. Form-typed children crashed submissions, rendering, fake submissions, the email preview and submission show.

  • The group's child picker now offers form fieldtypes only. Groups and uploads can't be nested.
  • Child settings use the form builder's field settings and endpoints, so form editors without blueprint permissions can edit them. Children are saved as form fieldtypes.
  • Form-typed children work for front-end submit, validation and rendering (with their own form views), fake submissions, the email preview and submission show.
  • Upgrading a legacy form converts group children the same way as top-level fields (text → short_answer, select → dropdown, …).
  • Existing assets/files children (inline or linked from a fieldset) keep their stored config, but aren't rendered or submitted. A warning is logged.
  • Child handles are validated when applying a child's settings: required, valid, not reserved, and unique among the group's fields.

Tests: GroupTest, FormGroupChildrenTest (CP endpoints, and front-end render/submit/validation), a group case in ConvertFieldsFromBlueprintTest, and FormGroupFieldsFieldtype.test.js.

jasonvarga and others added 6 commits November 18, 2026 21:12
The group's child picker now offers form fieldtypes only (no groups or uploads) and saves children as form fields. The group converts its children into core fields, so submit, render, the fake generator, the email preview and submission show work with form-typed children. Upload children (legacy or linked) are left out and logged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Legacy group children get the same fieldtype conversion as top-level fields, except assets and files children, which keep their stored config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The form-level reserved handles (date, message, messages) only apply to top-level form fields, so group children that use them (e.g. existing legacy children) can still have their settings applied. Core reserved handles still apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The builder context lives in its own module so the group fields fieldtype can use its key without importing the Builder page into the main bundle. Builder.vue re-exports it, so existing imports keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit ed70b9b into forms-2 Nov 19, 2026
61 checks passed
@jasonvarga
jasonvarga deleted the forms-2-fix-b3-group-children branch November 19, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant