You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, the collection beforeChange hook is supposed to run only after validation succeeds in a manner where you can be confident that the data is valid and will be saved to the document. In other words, "before changes" are saved. The docs even point out that it will run within create and update operations.
Moving this to an afterChange should still work, although I don't think it's necessary here personally.
Describe the Bug
The confirmation email is sent in the beforeChange hook:
payload/packages/plugin-form-builder/src/collections/FormSubmissions/index.ts
Line 110 in afcc970
In case validation fails no data got stored.
Solution: use afterChange hook or the afterCommit hook I proposed in another ticket.
Link to the code that reproduces this issue
https://github.com/cbratschi/payload
Reproduction Steps
See above.
Which area(s) are affected? (Select all that apply)
plugin: form-builder
Environment Info
The text was updated successfully, but these errors were encountered: