Fix for form-builder bug not yet published to npm
Link to reproduction
No response
Describe the Bug
About half a year ago, there was a fix for the form builder that correctly extended all hook overrides that are applied to the formSubmissions collection. See this commit Unfortunately, this fix has never been published to npm.
Can someone release and publish a version 1.2.3? (in package.json)
To Reproduce
Install latest version of the form builder plugin
Inspect files in the node_modules folder
note that in node_modules/@payloadcms/plugin-form-builder/dist/collections/FormSubmissions/index.js the file mismatches with how the source code is.
The code in the installed index.js:
hooks: {
beforeChange: [
(data)=>(0, _createCharge.default)(data, formConfig),
(data)=>(0, _sendEmail.default)(data, formConfig),
...formConfig?.formSubmissionOverrides?.hooks?.beforeChange || []
],
...formConfig?.formSubmissionOverrides?.hooks || {}
}
The source code:
hooks: {
...(formConfig?.formSubmissionOverrides?.hooks || {}),
beforeChange: [
(data) => createCharge(data, formConfig),
(data) => sendEmail(data, formConfig),
...(formConfig?.formSubmissionOverrides?.hooks?.beforeChange || []),
],
},
Payload Version
2.30.3
Adapters and Plugins
form-builder
Thanks for bringing this to our attention! We'll make sure it is published.
@denolfe @DanRibbens What is the expected date that a new release will be published?
@denolfe @DanRibbens This issue is blocking a major release for me. Can you please give an estimate of how long this will take to be resolved? Alternatively, could you propose a solution such that I can work with the fix in my project without publishing a release?
Hey @didierrothuizen , thank you for your patience on this. v1.2.3 of plugin-form-builder was just published. You can also use the payload-2 tag.
Awesome, glad to hear it 😄 Thanks for the help
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.