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
fix(plugin-form-builder): expose formSubmissionID as a variable to be used in emails (#14429)
### What?
Adds the `formSubmissionID` as a variable in `submissionData` so it can
be used in email templates via double curly brackets
`{{formSubmissionID}}`.
### Why?
The plugin determines when emails are sent and what data is available to
be used. Currently this is being done via the collection `beforeChange`
and the `formSubmissionID` does not exist at this point because the doc
hasn't been fully created yet.
This causes an issue for users wanting to including a direct link to the
submission in the email.
### How?
1. Moves the `sendEmail` functionality into the collection `afterChange`
hook.
2. In addition, it takes the `formSubmissionID` and passes it along with
the rest of the submission data.
Issue reported by client.
0 commit comments