diff --git a/demo/src/payload.config.ts b/demo/src/payload.config.ts index 47175e4..533f0bd 100644 --- a/demo/src/payload.config.ts +++ b/demo/src/payload.config.ts @@ -53,6 +53,10 @@ export default buildConfig({ 'pages' ], formOverrides: { + // labels: { + // singular: 'Contact Form', + // plural: 'Contact Forms' + // }, fields: [ { name: 'name', diff --git a/src/collections/FormSubmissions/index.ts b/src/collections/FormSubmissions/index.ts index 2d008a6..69a3922 100644 --- a/src/collections/FormSubmissions/index.ts +++ b/src/collections/FormSubmissions/index.ts @@ -6,6 +6,7 @@ import createCharge from './hooks/createCharge'; // all settings can be overridden by the config export const generateSubmissionCollection = (formConfig: PluginConfig): CollectionConfig => { const newConfig: CollectionConfig = { + ...formConfig?.formSubmissionOverrides || {}, slug: formConfig?.formSubmissionOverrides?.slug || 'form-submissions', access: { create: () => true, diff --git a/src/collections/Forms/index.ts b/src/collections/Forms/index.ts index d054609..798e9ac 100644 --- a/src/collections/Forms/index.ts +++ b/src/collections/Forms/index.ts @@ -63,6 +63,7 @@ export const generateFormCollection = (formConfig: PluginConfig): CollectionConf } const config: CollectionConfig = { + ...formConfig?.formOverrides || {}, slug: formConfig?.formOverrides?.slug || 'forms', admin: { useAsTitle: 'title',