Uh oh!
There was an error while loading. Please reload this page.
[5.x] Make it possible to add to form configuration screen - #8491
Conversation
caseydwyer
commented
Aug 12, 2023
+1, this would be a really valuable addition! 👍 |
duncanmcclean
left a comment
There was a problem hiding this comment.
After some initial testing, this is working well. I've left a few comments with some thoughts.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[maybe a dumb] question on this...would config values be accessible within the blueprint? Eg, could you set blueprint field visibility based on one of these new config fields? 🤔 |
ryanmitchell
commented
Dec 4, 2023
@caseydwyer not as things stand |
godismyjudge95
commented
Jan 10, 2024
If you get a chance could you update this for the latest Statamic version? (for composer patches) Thanks :) |
ryanmitchell
commented
Jan 10, 2024
@godismyjudge95 sure - done! |
plexus77
commented
Apr 9, 2024
I have been using this pull request as a patch and the latest version seems to be missing use Statamic\Support\Arr; from the appendConfigFields function |
ryanmitchell
commented
Apr 9, 2024
godismyjudge95
commented
May 14, 2024
@ryanmitchell would it be possible to update this pr? Attempting to update a few sites to Statamic 5 |
ryanmitchell
commented
May 14, 2024
@godismyjudge95 its already been updated for 5.x |
godismyjudge95
commented
May 14, 2024
Oh weird... I was getting an error about not being able to apply it as a composer patch. Must be something on my end then. |
plexus77
commented
May 19, 2024
Hi there the patch is also not applying correctly for me either for example I can see that there are some extra classes in the use statement for eample this is the updated patch for the Form class The original patch did not have the SubmissionQueryBuilder line in it so was rejected |
ryanmitchell
commented
May 19, 2024
Yes it’s been update for v5 and there are other changes made in v5. If you are trying to patch tov4 it won’t work. |
plexus77
commented
May 19, 2024
I'm using v5 though, it is this patch https://patch-diff.githubusercontent.com/raw/statamic/cms/pull/8491.patch that we should be using right? The code above is from the patch, it's not correct as there is no SubmissionQueryBuilder line, it will fail as the latest version of v5 which I am using has that in it. |
ryanmitchell
commented
May 19, 2024
plexus77
commented
May 19, 2024
Ok no probs, I have patched them myself anyway so all good for now, hopefully this PR can be merged in soon, thanks for having a look. |
jasonvarga
left a comment
There was a problem hiding this comment.
Thanks for thie PR. Sorry for the delay. 😅
Just a few minor tweaks.
- It's
Form::appendConfigFieldsandForm::extraConfigForto match other places (likeFieldtype::appendConfigFields)
ryanmitchell
commented
Jul 30, 2024
Amazing, this will be so useful. Thank you. |

Not sure if this is niche, but it would be really useful to be able to add to the form configuration screen so that fields can be modified through the UI. This is specifically useful when we want to integrate with 3rd party services (such as adding a Zapier URL), but also may be useful for other developers to add things such as success messages.
I can also see it being useful for add-ons (such as Mailchimp).
I initially thought of adding a "configuration" section with a blueprint builder, but that is a config screen to modify a config screen and that doesn't feel right to me.
So instead, what I'm suggesting is adding ContainsData to forms, and giving the ability for developers to register extra fields using the following method:
You can also pass a $handle of '*' if you want the fields to be added to all forms.
This then appends a config section to the screen as follows:
My config call for this is as follows:
Is this something you might consider?
Closesstatamic/ideas#1112