Repository navigation
[6.x] Forms 2: Group fields only contain form fields - #15968
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
text→short_answer,select→dropdown, …).assets/fileschildren (inline or linked from a fieldset) keep their stored config, but aren't rendered or submitted. A warning is logged.Tests:
GroupTest,FormGroupChildrenTest(CP endpoints, and front-end render/submit/validation), a group case inConvertFieldsFromBlueprintTest, andFormGroupFieldsFieldtype.test.js.