Readable form emails (forms.emailLayout)
{{*:table}} renders a readable submission summary (questions, option labels,
grouped by step, empty fields skipped) inside an email template with logo,
accent colour and footer from Site Settings → Emails. submitForm stores the
submission in the page language, so emails follow the visitor's locale.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -8,6 +8,8 @@ type BuildSiteSettingsArgs = {
|
||||
additionalFields?: Field[]
|
||||
/** "Under construction" tab (developer tool) — given when the pages module is on. */
|
||||
constructionFields?: Field[]
|
||||
/** "Emails" tab — given with `forms: { emailLayout: true }`. */
|
||||
emailFields?: Field[]
|
||||
/**
|
||||
* Fields for the "System Pages" tab — page assignments by role (homepage,
|
||||
* privacy policy, collection archives). Assembled by the caller, which is the
|
||||
@@ -33,6 +35,7 @@ type BuildSiteSettingsArgs = {
|
||||
export function buildSiteSettings({
|
||||
additionalFields,
|
||||
constructionFields,
|
||||
emailFields,
|
||||
systemPageFields,
|
||||
}: BuildSiteSettingsArgs = {}): GlobalConfig {
|
||||
return {
|
||||
@@ -58,6 +61,7 @@ export function buildSiteSettings({
|
||||
...(systemPageFields?.length
|
||||
? [{ fields: systemPageFields, label: 'System Pages' }]
|
||||
: []),
|
||||
...(emailFields?.length ? [{ fields: emailFields, label: 'Emails' }] : []),
|
||||
...(constructionFields?.length ? [{ fields: constructionFields, label: 'Under construction' }] : []),
|
||||
...(additionalFields?.length ? [{ fields: additionalFields, label: 'Custom' }] : []),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user