Repository navigation
[6.x] Append configs before and after - #15067
Merged
Merged
Conversation
duncanmcclean
self-requested a review
July 23, 2026 15:02
Positioning fields within a matched section is dropped, so the arguments always refer to section handles. Passing a position while adding fields to an existing section now throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without a position, an existing section with the same handle wins. Positioned sections now behave the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
extraConfigFor also feeds the form tag's and emails' form_config, which shouldn't see CP layout hints. Positions are now available separately via extraConfigPositionsFor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches 6.x, where a section whose handle collides with an existing one replaces it. A positioned section that collides now also replaces in place, and logs that its position was ignored, so adding a position never changes the outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Positions were filtered before same-display registrations collapsed, so a discarded registration's position could move, or throw for, the one that won. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Access section only exists on forms-2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jasonvarga
force-pushed
the
append-configs-before-and-after
branch
from
October 9, 2026 18:28
75d61ba to
4178518
Compare
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.
This allows us to do this, and append Automagic Forms settings as the second section:
beforeSection/afterSectiontake a section handle (name,fields,submissions,email). Only one may be passed.displaymatches an existing section, the fields are merged into it, and passing a position throws anInvalidArgumentException.Form::extraConfigFor()(which also feedsform_configin the form tag and emails). They're available viaForm::extraConfigPositionsFor().