diff --git a/apps/civicsignalblog/src/payload/fields/formInputFieldGroup.js b/apps/civicsignalblog/src/payload/fields/formInputFieldGroup.js index f50ddaa76..c02670cd3 100644 --- a/apps/civicsignalblog/src/payload/fields/formInputFieldGroup.js +++ b/apps/civicsignalblog/src/payload/fields/formInputFieldGroup.js @@ -1,8 +1,11 @@ function formInputFieldGroup({ label, name, - includeErrorMessageField = true, includeHintField = false, + includeErrorMessageField = true, + defaultLabelValue = "", + defaultErrorMessage = "", + defaultHint = "", additionalFields = [], }) { const fields = [ @@ -10,6 +13,7 @@ function formInputFieldGroup({ name: `${name}Label`, label: "Label", type: "text", + defaultValue: defaultLabelValue, required: true, }, ]; @@ -19,6 +23,7 @@ function formInputFieldGroup({ name: `${name}Hint`, label: "Hint", type: "text", + defaultValue: defaultHint, required: true, }); } @@ -28,6 +33,7 @@ function formInputFieldGroup({ name: `${name}ErrorMessage`, type: "text", label: "Error Message", + defaultValue: defaultErrorMessage, required: true, }); } diff --git a/apps/civicsignalblog/src/payload/globals/Forms/login/LoginTab.js b/apps/civicsignalblog/src/payload/globals/Forms/login/LoginTab.js index aba22f3b7..4499fdded 100644 --- a/apps/civicsignalblog/src/payload/globals/Forms/login/LoginTab.js +++ b/apps/civicsignalblog/src/payload/globals/Forms/login/LoginTab.js @@ -21,8 +21,18 @@ const LoginTab = { type: "collapsible", label: "Fields", fields: [ - formInputFieldGroup({ label: "E-mail", name: "email" }), - formInputFieldGroup({ label: "Password", name: "password" }), + formInputFieldGroup({ + label: "E-mail", + name: "email", + defaultLabelValue: "Email", + defaultErrorMessage: "You need to enter your email address.", + }), + formInputFieldGroup({ + label: "Password", + name: "password", + defaultLabelValue: "Password", + defaultErrorMessage: "You need to enter your password.", + }), ], }, {