Skip to content

Commit 7522c70

Browse files
authored
Merge pull request #8130 from umbraco/forms/docs-codebase-audit
Update Forms 16/17/18 docs to match current codebase
2 parents d8385b7 + 0b97b62 commit 7522c70

43 files changed

Lines changed: 321 additions & 304 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

16/umbraco-forms/developer/configuration/README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ With Umbraco Forms it's possible to customize the functionality with various con
1212

1313
All configuration for Umbraco Forms is held in the `appsettings.json` file found at the root of your Umbraco website. If the configuration has been customized to use another source, then the same keys and values discussed in this article can be applied there.
1414

15-
The convention for Umbraco configuration is to have package based options stored as a child structure below the `Umbraco` element, and as a sibling of `CMS`. Forms configuration follows this pattern, i.e.:
15+
The convention for Umbraco configuration is to have package-based options stored as a child structure below the `Umbraco` element, and as a sibling of `CMS`. Forms configuration follows this pattern, i.e.:
1616

1717
```json
1818
{
@@ -53,6 +53,7 @@ For illustration purposes, the following structure represents the full set of op
5353
"PreviousPageButtonLabel": "Previous",
5454
"SubmitButtonLabel": "Submit",
5555
"MessageOnSubmit": "Thank you",
56+
"MessageOnSubmitIsHtml": false,
5657
"StoreRecordsLocally": true,
5758
"AutocompleteAttribute": "",
5859
"DaysToRetainSubmittedRecordsFor": 0,
@@ -89,15 +90,14 @@ For illustration purposes, the following structure represents the full set of op
8990
"DisableRecordIndexing": false,
9091
"EnableFormsApi": false,
9192
"EnableRecordingOfIpWithFormSubmission": false,
92-
"UseSemanticFieldsetRendering": false,
9393
"DisableClientSideValidationDependencyCheck": false,
9494
"DisableRelationTracking": false,
9595
"TrackRenderedFormsStorageMethod": "HttpContextItems",
9696
"EnableMultiPageFormSettings": true,
9797
"EnableAdvancedValidationRules": false
9898
},
9999
"Security": {
100-
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx",
100+
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx,js",
101101
"AllowedFileUploadExtensions": "",
102102
"EnableAntiForgeryToken": true,
103103
"SavePlainTextPasswords": false,
@@ -304,6 +304,10 @@ These settings configure the default next, previous, and submit button labels. B
304304

305305
This allows you to configure what text is displayed when a form is submitted and is not being redirected to a different content node. Defaults to `Thank you`.
306306

307+
#### MessageOnSubmitIsHtml
308+
309+
This setting needs to be a `true` or `false` value. When set to `true`, the message configured in `MessageOnSubmit` is rendered as HTML. Defaults to `false`.
310+
307311
#### StoreRecordsLocally
308312

309313
This setting needs to be a `True` or `False` value and will allow you to toggle if form submission data should be stored in the Umbraco Forms database tables. By default this is set to `True`.
@@ -424,14 +428,6 @@ To include this information in the saved data, set this value to `true`.
424428

425429
If recording IPs and your site is behind a proxy, load balancer or CDN, we recommend using [ASP.NET's forwarded headers middleware](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-7.0) to ensure the correct value for the client IP is resolved.
426430

427-
### UseSemanticFieldsetRendering
428-
429-
In Forms 12.1 amends were made to the default theme for Forms that improved accessibility. Specifically we provide the option to use alternative markup for rendering checkbox and radio button lists. These use the more semantically correct `fieldset` and `legend` elements, instead of the previously used `div` and `label`.
430-
431-
Although this semantic markup is preferred, it could be a presentational breaking change for those styling the default theme. As such we have made this markup improvement optional. You can opt into using it by setting this configuration value to `true`.
432-
433-
In Umbraco 13 this configuration option will be removed and the semantic rendering made the only option.
434-
435431
### DisableClientSideValidationDependencyCheck
436432

437433
When a form is rendered on the front-end website, a check is run to ensure that client-side validation framework is available and registered.

16/umbraco-forms/developer/configuration/type-details.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Provides details of the built-in provider types available with Umbraco Forms
2+
description: "Provides details of the built-in provider types available with Umbraco Forms"
33
---
44

55
# Forms Provider Type Details
@@ -184,7 +184,7 @@ The intention is to be able to make available details such as IDs, aliases and p
184184

185185
<details>
186186

187-
<summary></summary>
187+
<summary>reCAPTCHA Enterprise</summary>
188188

189189
**ID:** `1BAB78CB-52B1-495C-BBC2-A46540642828`
190190

@@ -200,7 +200,7 @@ The intention is to be able to make available details such as IDs, aliases and p
200200

201201
<details>
202202

203-
<summary></summary>
203+
<summary>Rich Text</summary>
204204

205205
**ID:** `1F8D45F8-76E6-4550-A0F5-9637B8454619`
206206

@@ -215,7 +215,7 @@ The intention is to be able to make available details such as IDs, aliases and p
215215

216216
<details>
217217

218-
<summary></summary>
218+
<summary>Single Choice</summary>
219219

220220
**ID:** `903DF9B0-A78C-11DE-9FC1-DB7A56D89593`
221221

@@ -231,7 +231,7 @@ The intention is to be able to make available details such as IDs, aliases and p
231231

232232
<details>
233233

234-
<summary></summary>
234+
<summary>Short Answer</summary>
235235

236236
**ID:** `3F92E01B-29E2-4a30-BF33-9DF5580ED52C`
237237

@@ -269,7 +269,7 @@ The intention is to be able to make available details such as IDs, aliases and p
269269

270270
<details>
271271

272-
<summary></summary>
272+
<summary>Change Record State</summary>
273273

274274
**ID:** `4C40A092-0CB5-481d-96A7-A02D8E7CDB2F`
275275

@@ -284,7 +284,7 @@ The intention is to be able to make available details such as IDs, aliases and p
284284

285285
<details>
286286

287-
<summary></summary>
287+
<summary>Post as XML</summary>
288288

289289
**ID:** `470EEB3A-CB15-4b08-9FC0-A2F091583332`
290290

@@ -296,14 +296,15 @@ The intention is to be able to make available details such as IDs, aliases and p
296296
* `Method`
297297
* `XsltFile`
298298
* `Fields`
299+
* `DefaultElementForFields`
299300
* `Username`
300301
* `Password`
301302

302303
</details>
303304

304305
<details>
305306

306-
<summary></summary>
307+
<summary>Save As Umbraco Content Node</summary>
307308

308309
**ID:** `89FB1E31-9F36-4e08-9D1B-AF1180D340DB`
309310

@@ -319,7 +320,7 @@ The intention is to be able to make available details such as IDs, aliases and p
319320

320321
<details>
321322

322-
<summary></summary>
323+
<summary>Save As XML File</summary>
323324

324325
**ID:** `9CC5854D-61A2-48f6-9F4A-8F3BDFAFB521`
325326

@@ -371,13 +372,16 @@ The intention is to be able to make available details such as IDs, aliases and p
371372
* `ReplyToEmail`
372373
* `Subject`
373374
* `RazorViewFilePath`
375+
* `HeaderHtml`
376+
* `BodyHtml`
377+
* `FooterHtml`
374378
* `Attachment`
375379

376380
</details>
377381

378382
<details>
379383

380-
<summary></summary>
384+
<summary>Send Email With Extensible Stylesheet Language Transformations (XSLT) Template</summary>
381385

382386
**ID:** `616edfeb-badf-414b-89dc-d8655eb85998`
383387

@@ -397,7 +401,7 @@ The intention is to be able to make available details such as IDs, aliases and p
397401

398402
<details>
399403

400-
<summary></summary>
404+
<summary>Send Form To URL</summary>
401405

402406
**ID:** `FD02C929-4E7D-4f90-B9FA-13D074A76688`
403407

@@ -409,14 +413,15 @@ The intention is to be able to make available details such as IDs, aliases and p
409413
* `Method`
410414
* `StandardFields`
411415
* `Fields`
416+
* `DefaultElementForFields`
412417
* `Username`
413418
* `Password`
414419

415420
</details>
416421

417422
<details>
418423

419-
<summary></summary>
424+
<summary>Slack</summary>
420425

421426
**ID:** `bc52ab28-d3ff-42ee-af75-a5d49be83040`
422427

@@ -449,7 +454,7 @@ The intention is to be able to make available details such as IDs, aliases and p
449454

450455
<details>
451456

452-
<summary></summary>
457+
<summary>Datasource</summary>
453458

454459
**ID:** `cc9f9b2a-a746-11de-9e17-681b56d89593`
455460

@@ -459,7 +464,7 @@ The intention is to be able to make available details such as IDs, aliases and p
459464

460465
<details>
461466

462-
<summary></summary>
467+
<summary>Get Values From Text File</summary>
463468

464469
**ID:** `35C2053E-CBF7-4793-B27C-6E97B7671A2D`
465470

@@ -473,7 +478,7 @@ The intention is to be able to make available details such as IDs, aliases and p
473478

474479
<details>
475480

476-
<summary></summary>
481+
<summary>SQL Database</summary>
477482

478483
**ID:** `F1F5BD4D-E6AE-44ed-86CB-97661E4660B2`
479484

@@ -492,7 +497,7 @@ The intention is to be able to make available details such as IDs, aliases and p
492497

493498
<details>
494499

495-
<summary></summary>
500+
<summary>Umbraco Datatype Prevalues</summary>
496501

497502
**ID:** `EA773CAF-FEF2-491B-B5B7-6A3552B1A0E2`
498503

16/umbraco-forms/developer/custom-markup.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ The rest of the views start with FieldType, like `FieldType.Textfield.cshtml` an
4343
Contents of the `FieldType.Textfield.cshtml` view (from the default theme):
4444

4545
```csharp
46-
@model Umbraco.Forms.Mvc.Models.FieldViewModel
47-
@using Umbraco.Forms.Mvc
48-
49-
<input type="text"
50-
name="@Model.Name"
51-
id="@Model.Id"
52-
class="@Html.GetFormFieldClass(Model.FieldTypeName) text"
53-
value="@Model.ValueAsHtmlString"
54-
maxlength="500"
55-
@{if(string.IsNullOrEmpty(Model.PlaceholderText) == false){<text>placeholder="@Model.PlaceholderText"</text>}}
56-
@{if(Model.Mandatory || Model.Validate){<text>data-val="true"</text>}}
57-
@{if (Model.Mandatory) {<text> data-val-required="@Model.RequiredErrorMessage"</text>}}
58-
@{if (Model.Validate) {<text> data-val-regex="@Model.InvalidErrorMessage" data-val-regex-pattern="@Html.Raw(Model.Regex)"</text>}}
59-
/>
46+
@using Umbraco.Forms.Web
47+
@model Umbraco.Forms.Web.Models.FieldViewModel
48+
@{
49+
var maxLength = Model.GetSettingValue<int>("MaximumLength", 255);
50+
var fieldType = Model.GetSettingValue<string>("FieldType", "text");
51+
var autocompleteAttribute = Model.GetSettingValue<string>("AutocompleteAttribute", string.Empty);
52+
}
53+
<input type="@fieldType" name="@Model.Name" id="@Model.Id" data-umb="@Model.Id" class="text @Html.GetFormFieldClass(Model.FieldTypeName)" value="@Model.ValueAsHtmlString" maxlength="@maxLength"
54+
@{if (string.IsNullOrEmpty(Model.PlaceholderText) == false) { <text> placeholder="@Model.PlaceholderText" </text> }}
55+
@{if (string.IsNullOrEmpty(autocompleteAttribute) == false) { <text> autocomplete="@autocompleteAttribute" </text> }}
56+
@{if (Model.Mandatory || Model.Validate) { <text> data-val="true" </text> }}
57+
@{if (Model.Mandatory) { <text> data-val-required="@Model.RequiredErrorMessage" aria-required="true" </text> }}
58+
@{if (Model.Validate) { <text> data-val-regex="@Model.InvalidErrorMessage" data-val-regex-pattern="@Html.Raw(Model.Regex)" </text> }}
59+
aria-describedby="@(Model.Id)_validation@(!string.IsNullOrEmpty(Model.ToolTip) ? $" {Model.Id}_description" : "")"/>
6060
```
6161

6262
Umbraco Forms uses ASP.NET Unobtrusive Validation which is why you see attributes like `data-val` and `data-val-required`.

16/umbraco-forms/developer/email-templates.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Below is an example of an email template from the `~/Views/Partials/Forms/Emails
177177
{
178178
"FieldType.Recaptcha2.cshtml",
179179
"FieldType.Recaptcha3.cshtml",
180+
"FieldType.RecaptchaEnterprise.cshtml",
180181
"FieldType.RichText.cshtml",
181182
"FieldType.Text.cshtml"
182183
};

0 commit comments

Comments
 (0)