Skip to content

Commit 85223dc

Browse files
authored
Merge pull request #6748 from umbraco/forms/remove-default-email-template
Added details on removing built-in email templates
2 parents 48ea4d2 + 93fd54f commit 85223dc

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

13/umbraco-forms/developer/themes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,21 @@ public class MyComposer : IComposer
113113
}
114114
```
115115

116+
##### Removing the Default Email Template
117+
118+
If providing custom email templates, you may want to remove the one provided with Forms. You can do that via the same `EmailTemplates` collection.
119+
120+
```csharp
121+
public class MyComposer : IComposer
122+
{
123+
public void Compose(IUmbracoBuilder builder)
124+
{
125+
builder.EmailTemplates()
126+
.Exclude<DefaultEmailTemplate>();
127+
}
128+
}
129+
```
130+
116131
## Using a Theme
117132

118133
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`.

14/umbraco-forms/developer/themes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@ public class MyComposer : IComposer
114114
}
115115
```
116116

117+
##### Removing the Default Email Template
118+
119+
If providing custom email templates, you may want to remove the one provided with Forms. You can do that via the same `EmailTemplates` collection.
120+
121+
```csharp
122+
public class MyComposer : IComposer
123+
{
124+
public void Compose(IUmbracoBuilder builder)
125+
{
126+
builder.EmailTemplates()
127+
.Exclude<DefaultEmailTemplate>();
128+
}
129+
}
130+
```
131+
117132
## Using a Theme
118133

119134
When rendering a form in a view file, you can specify which theme to use with the form.

15/umbraco-forms/developer/themes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@ public class MyComposer : IComposer
114114
}
115115
```
116116

117+
##### Removing the Default Email Template
118+
119+
If providing custom email templates, you may want to remove the one provided with Forms. You can do that via the same `EmailTemplates` collection.
120+
121+
```csharp
122+
public class MyComposer : IComposer
123+
{
124+
public void Compose(IUmbracoBuilder builder)
125+
{
126+
builder.EmailTemplates()
127+
.Exclude<DefaultEmailTemplate>();
128+
}
129+
}
130+
```
131+
117132
## Using a Theme
118133

119134
When rendering a form in a view file, you can specify which theme to use with the form.

15/umbraco-forms/upgrading/version-specific.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For reference, the full details are listed here:
2626

2727
* The setting `FieldSettings:Recaptcha3:ShowFieldValidation` has a new default of `true`.
2828
* The setting `Options:EnableMultiPageFormSettings` has a new default of `true`.
29-
* The setting `FormDesign:RemoveProvidedEmailTemplate` has been removed (as adding and removing email templates can be more consistently handled using `EmailTemplateCollection`).
29+
* 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)).
3030

3131
#### **Asynchronous Methods**
3232

0 commit comments

Comments
 (0)