Skip to content

Commit fade729

Browse files
authored
Merge pull request #6731 from AndyButland/forms/release-notes-13.4.0-rc1-and-15.1.0-rc1
Added release notes for Forms 13.4-rc1 and 15.1-rc1
2 parents 998c37f + b9bd789 commit fade729

File tree

12 files changed

+287
-4
lines changed

12 files changed

+287
-4
lines changed

13/umbraco-forms/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
* [Creating a Form - The basics](editor/creating-a-form/README.md)
2121
* [Form Settings](editor/creating-a-form/form-settings.md)
22+
* [Form Advanced Options](editor/creating-a-form/form-advanced.md)
2223
* [Form Information](editor/creating-a-form/form-info.md)
2324
* [Overview Of The Field Types](editor/creating-a-form/fieldtypes/README.md)
2425
* [Date](editor/creating-a-form/fieldtypes/date.md)

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ For illustration purposes, the following structure represents the full set of op
9494
"DisableClientSideValidationDependencyCheck": false,
9595
"DisableRelationTracking": false,
9696
"TrackRenderedFormsStorageMethod": "TempData",
97-
"EnableMultiPageFormSettings": false
97+
"EnableMultiPageFormSettings": false,
98+
"EnableAdvancedValidationRules": false
9899
},
99100
"Security": {
100101
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx",
@@ -456,6 +457,14 @@ By default the value is `false`. This ensures that, in an upgrade scenario, befo
456457

457458
To make the feature available to editors set the value to `true`.
458459

460+
## EnableAdvancedValidationRules
461+
462+
This setting determines whether [advanced form validation rules](../../editor/creating-a-form/form-advanced.md) are available to editors.
463+
464+
By default, the value is `false`. This is partly because the feature is only considered for "power users", comfortable with crafting rules using the required JSON syntax. And partly as validating the rules on the client requires an additional front-end dependency.
465+
466+
To make the feature available to editors and include the dependency when using `@Html.RenderUmbracoFormDependencies(Url)`, set the value to `true`.
467+
459468
## Security configuration
460469

461470
### DisallowedFileUploadExtensions
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Form Advanced Options
2+
3+
In this article, you will find information about accessing the Forms Advanced Options and the features available to customize your Form.
4+
5+
To access the Form Advanced Options:
6+
7+
1. Navigate to the **Forms** section.
8+
2. Open a Form you wish to customize.
9+
3. Click **Advanced** in the top-right corner of the screen.
10+
11+
{% hint style="info" %}
12+
The advanced options for forms are only available when [configured to display](../../developer/configuration/README.md#enableadvancedvalidationrules).
13+
{% endhint %}
14+
15+
## Validation Rules
16+
17+
When creating forms you can add validation to individual fields, making them mandatory or applying a regular expression pattern. You can provide validation rules for the entire form via the advanced options. This allows you to validate expressions based on multiple fields. For example, "these two email fields should be the same", or "this date should be after this other one".
18+
19+
![Validation rules](./images/validation-rules.png)
20+
21+
To add new rules, you need to provide the rule definition, an error message and select a field to which the message will be associated. Once created you can click to edit or delete them from the list.
22+
23+
Crafting the rule definition itself requires use of [JSON logic](https://jsonlogic.com/) along with placeholders for the field or fields that are being validated.
24+
25+
### Examples
26+
27+
One example use case would be ensuring that two fields match each other, perhaps when asking for a user's email address. Given two fields on the form, one with the alias of `email` and the other `compareEmail`, the rule would be:
28+
29+
```json
30+
{
31+
"==": [
32+
"{email}",
33+
"{compareEmail}"
34+
]
35+
}
36+
```
37+
38+
A slightly more complex example could be with two dates, where, if provided, you want to ensure the second date is later than the first. So given fields with aliases of `startDate` and `endDate` a rule would look like this:
39+
40+
```json
41+
{
42+
"or": [
43+
{
44+
"==": [
45+
"{startDate}",
46+
""
47+
]
48+
},
49+
{
50+
"==": [
51+
"{endDate}",
52+
""
53+
]
54+
},
55+
{
56+
">": [
57+
"{endDate}",
58+
"{startDate}"
59+
]
60+
}
61+
]
62+
}
63+
```
64+
65+
Rules can be nested too. In this final illustrative example, we have two fields. One with the alias `choose` is a drop-down list with two values: `A` and `B`. The second field with alias `test` we want to be completed only if the user selects `B`. So we create a rule that is valid only if A is selected OR B is selected AND `test` is completed.
66+
67+
```json
68+
{
69+
"or": [
70+
{
71+
"==": [
72+
"{choose}",
73+
"A"
74+
]
75+
},
76+
{
77+
"and": [
78+
{
79+
"==": [
80+
"{choose}",
81+
"B"
82+
]
83+
},
84+
{
85+
"!=": [
86+
"{test}",
87+
""
88+
]
89+
}
90+
]
91+
}
92+
]
93+
}
94+
```
95+
96+
Overall, you can create rules of varying complexity, using comparisons between fields and static values.
97+
98+
When the form is rendered, these validation rules will be applied on both the client and server-side. In this way, you can ensure the submission is only accepted if it meets the requirements.

13/umbraco-forms/editor/creating-a-form/form-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Form Settings
22

3-
In this article, you will find information about accessing the Forms Settings and the validations available to customize your Form.
3+
In this article, you will find information about accessing the Forms Settings and the options available to customize your Form.
44

55
To access the Form Settings:
66

56.2 KB
Loading

13/umbraco-forms/release-notes.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,38 @@ If you are upgrading to a new major version, you can find information about the
1616

1717
This section contains the release notes for Umbraco Forms 13 including all changes for this version.
1818

19+
#### [**13.4.0-rc1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.4.0) **(December 17th 2024)**
20+
21+
##### Validation rules across form fields
22+
23+
When creating forms you are able to add validation to individual fields, making them mandatory or applying a regular expression pattern. With the 13.4 release we are looking to make this more powerful, by allowing the addition of validation rules for the entire form. The idea is that this will allow you to validate expressions based on multiple fields. For example, "these two email fields should be the same", or "this date should be after this other one".
24+
25+
Crafting these rules requires use of [JSON logic](https://jsonlogic.com/) so is considered a "power user" feature. They also require an additional front-end dependency for the rendering of forms on the website. As such they are surfaced on a new "Advanced" tab and only visible and used if enabled in configuration. We don't have, and it seems difficult to provide, an intuitive user interface for rule creation taking into account all the flexibility available. Nonetheless, having the ability to use more complex validation rules seems a valuable addition.
26+
27+
When the form is rendered, the validation rules will be applied on the client, where we support both the `aspnet-client-validation` and `jquery.validate` libraries. They are also verified server-side. In this way you can ensure the submission is only accepted if it meets the requirements.
28+
29+
Feedback on this feature in particular is welcome.
30+
31+
Read more about [editing advanced validation rules](./editor/creating-a-form/form-advanced.md) as well as the [configuration option required to enable them](./developer/configuration/README.md#enableadvancedvalidationrules).
32+
33+
##### Tracking editor activity
34+
35+
Whilst previously we tracked and displayed the date a form was created and last edited, we didn't show who had made these updates. With 13.4 installed we will start to track this and display the information where available. You'll find this on the form, data source or prevalue source's "Info" tab [#1315](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1315).
36+
37+
##### Copy of workflows
38+
39+
Forms allows you to make a copy of a form to use as a starting point for a new one. You can choose whether or not to copy workflows along with the form. With the 13.4 release, we've made available a second dialog allowing you to copy workflows to an existing form [#1185](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1185). You can select any or all of the workflows on the current form and copy them to the selected destination form.
40+
41+
We've also resolved an edge case around copying a form. It's possible to [define workflows as mandatory](./developer/extending/customize-default-workflows.md#setting-a-mandatory-default-workflow). Copying the form without workflows excludes the desired workflow. You would have a form that didn't contain the workflow you wanted to be included on all. This has been tightened up now and mandatory workflows will always be assigned to the copied form [#1331](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1331).
42+
43+
##### Form picker enhancements
44+
45+
In the 14.2 release we enhanced the [form picker property editors](./developer/property-editors.md). We introduced support for restriction of which forms can be selected by folder rather than only by individual forms. This has now been backported to Forms 13 [#891](https://github.com/umbraco/Umbraco.Forms.Issues/issues/891).
46+
47+
##### File upload validation messages
48+
49+
Previously the validation messages presented on the website front end when uploading files were hardcoded and always provided in English. We've added settings now to the "File Upload" field type allowing you to customize these. Dictionary keys can be used in order to provide the information in the user's preferred language [#1327](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1327).
50+
1951
#### [**13.3.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.3.3) **(December 5th 2024)**
2052

2153
* Fixed regression introduced in 13.3.1 that caused issues for custom field types overriding the `ProcessSubmittedValue` method [#1328](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1328).

15/umbraco-forms/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
* [Creating a Form - The basics](editor/creating-a-form/README.md)
2121
* [Form Settings](editor/creating-a-form/form-settings.md)
22+
* [Form Advanced Options](editor/creating-a-form/form-advanced.md)
2223
* [Form Information](editor/creating-a-form/form-info.md)
2324
* [Overview Of The Field Types](editor/creating-a-form/fieldtypes/README.md)
2425
* [Date](editor/creating-a-form/fieldtypes/date.md)

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ For illustration purposes, the following structure represents the full set of op
9393
"DisableClientSideValidationDependencyCheck": false,
9494
"DisableRelationTracking": false,
9595
"TrackRenderedFormsStorageMethod": "HttpContextItems",
96-
"EnableMultiPageFormSettings": true
96+
"EnableMultiPageFormSettings": true,
97+
"EnableAdvancedValidationRules": false
9798
},
9899
"Security": {
99100
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx",
@@ -446,6 +447,15 @@ This setting determines whether [multi-page form settings](../../editor/creating
446447

447448
By default the value is `true`. To disable the feature, set the value to `false`.
448449

450+
## EnableAdvancedValidationRules
451+
452+
This setting determines whether [advanced form validation rules](../../editor/creating-a-form/form-advanced.md) are available to editors.
453+
454+
By default, the value is `false`. This is partly because the feature is only considered for "power users", comfortable with crafting rules using the required JSON syntax. And partly as validating the rules on the client requires an additional front-end dependency.
455+
456+
To make the feature available to editors and include the dependency when using `@Html.RenderUmbracoFormDependencies(Url)`, set the value to `true`.
457+
458+
449459
## Security configuration
450460

451461
### DisallowedFileUploadExtensions
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Form Advanced Options
2+
3+
In this article, you will find information about accessing the Forms Advanced Options and the features available to customize your Form.
4+
5+
To access the Form Advanced Options:
6+
7+
1. Navigate to the **Forms** section.
8+
2. Open a Form you wish to customize.
9+
3. Click **Advanced** in the top-right corner of the screen.
10+
11+
{% hint style="info" %}
12+
The advanced options for forms are only available when [configured to display](../../developer/configuration/README.md#enableadvancedvalidationrules).
13+
{% endhint %}
14+
15+
## Validation Rules
16+
17+
When creating forms you can add validation to individual fields, making them mandatory or applying a regular expression pattern. You can provide validation rules for the entire form via the advanced options. This allows you to validate expressions based on multiple fields. For example, "these two email fields should be the same", or "this date should be after this other one".
18+
19+
![Validation rules](./images/validation-rules.png)
20+
21+
To add new rules, you need to provide the rule definition, an error message and select a field to which the message will be associated. Once created you can click to edit or delete them from the list.
22+
23+
Crafting the rule definition itself requires use of [JSON logic](https://jsonlogic.com/) along with placeholders for the field or fields that are being validated.
24+
25+
### Examples
26+
27+
One example use case would be ensuring that two fields match each other, perhaps when asking for a user's email address. Given two fields on the form, one with the alias of `email` and the other `compareEmail`, the rule would be:
28+
29+
```json
30+
{
31+
"==": [
32+
"{email}",
33+
"{compareEmail}"
34+
]
35+
}
36+
```
37+
38+
A slightly more complex example could be with two dates, where, if provided, you want to ensure the second date is later than the first. So given fields with aliases of `startDate` and `endDate` a rule would look like this:
39+
40+
```json
41+
{
42+
"or": [
43+
{
44+
"==": [
45+
"{startDate}",
46+
""
47+
]
48+
},
49+
{
50+
"==": [
51+
"{endDate}",
52+
""
53+
]
54+
},
55+
{
56+
">": [
57+
"{endDate}",
58+
"{startDate}"
59+
]
60+
}
61+
]
62+
}
63+
```
64+
65+
Rules can be nested too. In this final illustrative example, we have two fields. One with the alias `choose` is a drop-down list with two values: `A` and `B`. The second field with alias `test` we want to be completed only if the user selects `B`. So we create a rule that is valid only if A is selected OR B is selected AND `test` is completed.
66+
67+
```json
68+
{
69+
"or": [
70+
{
71+
"==": [
72+
"{choose}",
73+
"A"
74+
]
75+
},
76+
{
77+
"and": [
78+
{
79+
"==": [
80+
"{choose}",
81+
"B"
82+
]
83+
},
84+
{
85+
"!=": [
86+
"{test}",
87+
""
88+
]
89+
}
90+
]
91+
}
92+
]
93+
}
94+
```
95+
96+
Overall, you can create rules of varying complexity, using comparisons between fields and static values.
97+
98+
When the form is rendered, these validation rules will be applied on both the client and server-side. In this way, you can ensure the submission is only accepted if it meets the requirements.

15/umbraco-forms/editor/creating-a-form/form-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Form Settings
22

3-
In this article, you will find information about accessing the Form Settings and the validations available to customize your Form.
3+
In this article, you will find information about accessing the Form Settings and the options available to customize your Form.
44

55
To access the Form Settings:
66

0 commit comments

Comments
 (0)