From 2b0f9c80ce735c0f4394b204b7a5d5ac71ffe378 Mon Sep 17 00:00:00 2001 From: Jellygnite Date: Fri, 27 Nov 2020 08:54:52 +1000 Subject: [PATCH] added response message --- src/Extensions/SiteConfigExtension.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Extensions/SiteConfigExtension.php b/src/Extensions/SiteConfigExtension.php index f33567c..02e69e7 100644 --- a/src/Extensions/SiteConfigExtension.php +++ b/src/Extensions/SiteConfigExtension.php @@ -5,6 +5,7 @@ use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextareaField; use SilverStripe\Forms\TextField; +use SilverStripe\Forms\HTMLEditor\HTMLEditorField; use SilverStripe\AssetAdmin\Forms\UploadField; use SilverStripe\Assets\File; use SilverStripe\Assets\Image; @@ -18,6 +19,7 @@ class SiteConfigExtension extends DataExtension private static $db = [ "AdministratorEmail" => "Varchar(254)", + "ContactResponse" => "HTMLText", "Phone" => "Varchar(50)", "Fax" => "Varchar(50)", "Email" => "Varchar(254)", @@ -61,7 +63,10 @@ public function updateCMSFields(FieldList $fields) { $fields->addFieldsToTab("Root.ContactDetails", array( TextField::create("AdministratorEmail", "Email to receive Submissions") - ->setRightTitle("All form submissions will be sent to this email address.") + ->setRightTitle("All form submissions will be sent to this email address."), + HTMLEditorField::create("ContactResponse", "Contact Response") + ->setRightTitle("Message to display after submitting contact form.") + ->setRows(5) )); $fields->addFieldsToTab("Root.ContactDetails", array(