Paul
78dd6a2d5b
feat(plugin-form-builder): pass beforeChange params into beforeEmail hook and add types to it ( #7626 )
...
Form Builder Plugin BeforeEmail hook now takes a generic for your
generated types and it has the full hook params available to it.
```ts
import type { BeforeEmail } from '@payloadcms/plugin-form-builder'
// Your generated FormSubmission type
import type {FormSubmission} from '@payload-types'
// Pass it through and 'data' or 'originalDoc' will now be typed
const beforeEmail: BeforeEmail<FormSubmission> = (emailsToSend, beforeChangeParams) => {
// modify the emails in any way before they are sent
return emails.map((email) => ({
...email,
html: email.html, // transform the html in any way you'd like (maybe wrap it in an html template?)
}))
}
```
2024-08-12 12:22:52 -06:00
..
2024-08-08 20:05:07 -04:00
2024-08-06 23:54:34 +00:00
2024-08-06 14:01:46 +00:00
2024-08-06 14:01:46 +00:00
2024-07-11 15:59:38 -04:00
2024-08-07 11:10:53 -04:00
2024-07-31 14:55:08 -04:00
2024-07-24 12:43:29 -04:00
2024-07-15 13:26:29 -04:00
2024-07-26 10:33:46 -04:00
2024-07-24 12:43:29 -04:00
2024-07-31 16:42:00 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-29 16:28:28 -04:00
2024-07-11 15:59:38 -04:00
2024-08-06 11:15:47 -04:00
2024-08-12 10:34:21 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-27 09:33:31 -04:00
2024-08-05 17:10:35 -04:00
2024-07-20 23:25:50 +00:00
2024-05-12 21:28:19 -04:00
2024-08-06 12:17:50 -04:00
2024-05-25 21:57:32 +00:00
2024-07-24 13:57:10 -04:00
2024-07-11 15:59:38 -04:00
2024-08-08 19:51:12 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-20 23:25:50 +00:00
2024-08-12 12:22:52 -06:00
2024-07-20 23:25:50 +00:00
2024-08-11 13:18:49 -06:00
2024-07-11 15:59:38 -04:00
2024-07-22 15:47:39 -04:00
2024-07-11 15:59:38 -04:00
2024-07-26 14:03:25 -04:00
2024-07-23 14:30:09 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-23 13:44:44 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:59:38 -04:00
2024-07-11 15:27:01 -04:00
2024-07-11 15:27:01 -04:00
2024-08-02 14:03:12 +01:00
2024-08-07 11:10:53 -04:00
2024-07-11 15:59:38 -04:00
2024-05-25 15:45:05 +00:00
2024-07-29 11:10:46 -04:00
2023-09-01 14:45:41 -04:00
2024-03-07 11:33:46 -05:00
2024-08-05 14:53:21 -04:00
2024-07-11 15:59:38 -04:00
2024-05-13 16:46:43 -04:00
2024-06-17 14:25:36 -04:00
2024-08-06 23:54:34 +00:00
2024-06-05 10:55:02 -04:00
2024-06-05 10:55:02 -04:00
2024-06-05 10:55:02 -04:00
2024-03-19 11:31:50 -04:00
2024-08-05 09:58:27 -04:00
2024-05-01 17:35:41 -04:00
2024-05-17 12:48:37 -04:00
2024-07-11 18:33:45 +00:00
2024-04-06 15:06:04 -04:00
2024-06-17 14:25:36 -04:00
2024-06-10 22:03:12 +00:00
2024-03-14 23:53:47 -04:00
2024-07-11 15:27:01 -04:00
2024-05-13 01:37:52 +00:00