-
-
Notifications
You must be signed in to change notification settings - Fork 611
[6.x] Add extra sections with fields to existing fieldtypes#13796
[6.x] Add extra sections with fields to existing fieldtypes #13796nopticon wants to merge 6 commits intostatamic:6.x from
Conversation
ryanmitchell
commented
Feb 2, 2026
Related: #12723
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is the right way to check, as replicators and bards both have fields so this check would mark them both as sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ryanmitchell Are you referring to replicators and bard fields that you want to add with appendConfigFields method? Something like this:
This check does validate fields key on the first level of the array generated by
Line 293 in 80f7049
fields keys, so I haven't seen the behavior that you mentioned. This PR does not affect other existing fields beside the ones that you define calling appendConfigField or appendConfigFields method.
I did a lot of tests in my dev site and all fields seems to be working fine, if you see something weird is happening please let me know. Thanks for your review!
This is how it looks for my custom test calling Text::appendConfigFields():
After reading https://statamic.dev/fieldtypes/build-a-fieldtype#adding-config-fields-to-existing-fieldtypes I noticed that extra sections are not added to fieldtype config.
Before this fix, it shows like this:
imageAfter fixing this issue, it shows fields inside the new section:
imageAfter adding
appendConfigFieldsto a ServiceProvider, it can be tested on any blueprint at/cp/collections/{collection}/blueprints/{blueprint}/edit