From fce39657a86cb032d14cf94a44646dc6922bc91a Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Thu, 12 Dec 2024 21:36:01 +0100 Subject: [PATCH 1/2] Added details on removing built-in email templates --- 13/umbraco-forms/developer/themes.md | 15 +++++++++++++++ 14/umbraco-forms/developer/themes.md | 15 +++++++++++++++ 15/umbraco-forms/developer/themes.md | 15 +++++++++++++++ 15/umbraco-forms/upgrading/version-specific.md | 2 +- 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/13/umbraco-forms/developer/themes.md b/13/umbraco-forms/developer/themes.md index 8b43e324f1b..078e03ff85a 100644 --- a/13/umbraco-forms/developer/themes.md +++ b/13/umbraco-forms/developer/themes.md @@ -113,6 +113,21 @@ public class MyComposer : IComposer } ``` +##### Removing the Default Email Template + +If providing custom email templates, you may want to remove the one provided with Forms. You can do that via the same `EmailTemplates` collection. + +```csharp +public class MyComposer : IComposer +{ + public void Compose(IUmbracoBuilder builder) + { + builder.EmailTemplates() + .Exclude(); + } +} +``` + ## Using a Theme To use a theme with a Form use the "Insert Form" macro where you will be presented with the options of the form you wish to insert along with an option to pick a theme. This displays the list of theme folders found at `Views/Partials/Forms/Themes`. diff --git a/14/umbraco-forms/developer/themes.md b/14/umbraco-forms/developer/themes.md index 828afaaf5b9..05f3279ba75 100644 --- a/14/umbraco-forms/developer/themes.md +++ b/14/umbraco-forms/developer/themes.md @@ -114,6 +114,21 @@ public class MyComposer : IComposer } ``` +##### Removing the Default Email Template + +If providing custom email templates, you may want to remove the one provided with Forms. You can do that via the same `EmailTemplates` collection. + +```csharp +public class MyComposer : IComposer +{ + public void Compose(IUmbracoBuilder builder) + { + builder.EmailTemplates() + .Exclude(); + } +} +``` + ## Using a Theme When rendering a form in a view file, you can specify which theme to use with the form. diff --git a/15/umbraco-forms/developer/themes.md b/15/umbraco-forms/developer/themes.md index 1afe0666b37..9a7e83a631e 100644 --- a/15/umbraco-forms/developer/themes.md +++ b/15/umbraco-forms/developer/themes.md @@ -114,6 +114,21 @@ public class MyComposer : IComposer } ``` +##### Removing the Default Email Template + +If providing custom email templates, you may want to remove the one provided with Forms. You can do that via the same `EmailTemplates` collection. + +```csharp +public class MyComposer : IComposer +{ + public void Compose(IUmbracoBuilder builder) + { + builder.EmailTemplates() + .Exclude(); + } +} +``` + ## Using a Theme When rendering a form in a view file, you can specify which theme to use with the form. diff --git a/15/umbraco-forms/upgrading/version-specific.md b/15/umbraco-forms/upgrading/version-specific.md index bc0680f4e3c..ad9004052e1 100644 --- a/15/umbraco-forms/upgrading/version-specific.md +++ b/15/umbraco-forms/upgrading/version-specific.md @@ -26,7 +26,7 @@ For reference, the full details are listed here: * The setting `FieldSettings:Recaptcha3:ShowFieldValidation` has a new default of `true`. * The setting `Options:EnableMultiPageFormSettings` has a new default of `true`. -* The setting `FormDesign:RemoveProvidedEmailTemplate` has been removed (as adding and removing email templates can be more consistently handled using `EmailTemplateCollection`). +* The setting `FormDesign:RemoveProvidedEmailTemplate` has been removed (as adding and removing email templates can be more consistently handled using `EmailTemplateCollection` as described [here](../developer/themes.md#removing-the-default-email-template)). #### **Asynchronous Methods** From 93fd54fd62a8dad41d4fa517f879f8e3043f0779 Mon Sep 17 00:00:00 2001 From: sofietoft Date: Mon, 16 Dec 2024 08:42:24 +0100 Subject: [PATCH 2/2] Make link more direct --- 15/umbraco-forms/upgrading/version-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-forms/upgrading/version-specific.md b/15/umbraco-forms/upgrading/version-specific.md index ad9004052e1..6336c856ed6 100644 --- a/15/umbraco-forms/upgrading/version-specific.md +++ b/15/umbraco-forms/upgrading/version-specific.md @@ -26,7 +26,7 @@ For reference, the full details are listed here: * The setting `FieldSettings:Recaptcha3:ShowFieldValidation` has a new default of `true`. * The setting `Options:EnableMultiPageFormSettings` has a new default of `true`. -* The setting `FormDesign:RemoveProvidedEmailTemplate` has been removed (as adding and removing email templates can be more consistently handled using `EmailTemplateCollection` as described [here](../developer/themes.md#removing-the-default-email-template)). +* The setting `FormDesign:RemoveProvidedEmailTemplate` has been removed (as adding and removing email templates can be more consistently handled using [`EmailTemplateCollection`](../developer/themes.md#removing-the-default-email-template)). #### **Asynchronous Methods**