Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added release notes for Forms 13.4-rc1 and 15.1-rc1 #6731

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
da0f3d5
Added release notes for Forms 13.4-rc1 and 15.1-rc1
AndyButland Dec 10, 2024
df8a62d
Correction
AndyButland Dec 10, 2024
05b631b
Linting
AndyButland Dec 10, 2024
535ab3d
Update 13/umbraco-forms/developer/configuration/README.md
eshanrnh Dec 11, 2024
86a3256
Update 13/umbraco-forms/developer/configuration/README.md
eshanrnh Dec 11, 2024
36b82b9
Update 13/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
af72df4
Update 13/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
de35633
Update 13/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
12da115
Update 13/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
56284c4
Update 13/umbraco-forms/release-notes.md
eshanrnh Dec 11, 2024
03bd8e4
Update 13/umbraco-forms/release-notes.md
eshanrnh Dec 11, 2024
a5fcad4
Update 15/umbraco-forms/developer/configuration/README.md
eshanrnh Dec 11, 2024
059a7e2
Update 15/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
0001dcf
Update 15/umbraco-forms/developer/configuration/README.md
eshanrnh Dec 11, 2024
1d2dcaa
Update 15/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
96c8dd9
Update 15/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
aec7c7c
Update 15/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
d78f72a
Update 15/umbraco-forms/release-notes.md
eshanrnh Dec 11, 2024
cd1d8b8
Update 15/umbraco-forms/release-notes.md
eshanrnh Dec 11, 2024
b9a52b9
Update 13/umbraco-forms/release-notes.md
eshanrnh Dec 11, 2024
d990702
Update 13/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
128f29c
Update 15/umbraco-forms/editor/creating-a-form/form-advanced.md
eshanrnh Dec 11, 2024
9d3d02b
Update 15/umbraco-forms/release-notes.md
eshanrnh Dec 11, 2024
d68c0b0
Further advanced validation rule example
AndyButland Dec 11, 2024
b9bd789
Merge branch 'forms/release-notes-13.4.0-rc1-and-15.1.0-rc1' of https…
AndyButland Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 13/umbraco-forms/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

* [Creating a Form - The basics](editor/creating-a-form/README.md)
* [Form Settings](editor/creating-a-form/form-settings.md)
* [Form Advanced Options](editor/creating-a-form/form-advanced.md)
* [Form Information](editor/creating-a-form/form-info.md)
* [Overview Of The Field Types](editor/creating-a-form/fieldtypes/README.md)
* [Date](editor/creating-a-form/fieldtypes/date.md)
Expand Down
11 changes: 10 additions & 1 deletion 13/umbraco-forms/developer/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ For illustration purposes, the following structure represents the full set of op
"DisableClientSideValidationDependencyCheck": false,
"DisableRelationTracking": false,
"TrackRenderedFormsStorageMethod": "TempData",
"EnableMultiPageFormSettings": false
"EnableMultiPageFormSettings": false,
"EnableAdvancedValidationRules": false
},
"Security": {
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx",
Expand Down Expand Up @@ -456,6 +457,14 @@ By default the value is `false`. This ensures that, in an upgrade scenario, befo

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

## EnableAdvancedValidationRules

This setting determines whether [advanced form validation rules](../../editor/creating-a-form/form-advanced.md) are available to editors.

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.

To make the feature available to editors and include the dependency when using `@Html.RenderUmbracoFormDependencies(Url)`, set the value to `true`.

## Security configuration

### DisallowedFileUploadExtensions
Expand Down
98 changes: 98 additions & 0 deletions 13/umbraco-forms/editor/creating-a-form/form-advanced.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Form Advanced Options

In this article, you will find information about accessing the Forms Advanced Options and the features available to customize your Form.

To access the Form Advanced Options:

1. Navigate to the **Forms** section.
2. Open a Form you wish to customize.
3. Click **Advanced** in the top-right corner of the screen.

{% hint style="info" %}
The advanced options for forms are only available when [configured to display](../../developer/configuration/README.md#enableadvancedvalidationrules).
{% endhint %}

## Validation Rules

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".

![Validation rules](./images/validation-rules.png)

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.
eshanrnh marked this conversation as resolved.
Show resolved Hide resolved

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.

### Examples

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:

```json
{
"==": [
"{email}",
"{compareEmail}"
]
}
```

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:

```json
{
"or": [
{
"==": [
"{startDate}",
""
]
},
{
"==": [
"{endDate}",
""
]
},
{
">": [
"{endDate}",
"{startDate}"
]
}
]
}
```

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.

Check failure on line 65 in 13/umbraco-forms/editor/creating-a-form/form-advanced.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.Acronyms] 'AND' has no definition Raw Output: {"message": "[UmbracoDocs.Acronyms] 'AND' has no definition", "location": {"path": "13/umbraco-forms/editor/creating-a-form/form-advanced.md", "range": {"start": {"line": 65, "column": 323}}}, "severity": "ERROR"}

```json
{
"or": [
{
"==": [
"{choose}",
"A"
]
},
{
"and": [
{
"==": [
"{choose}",
"B"
]
},
{
"!=": [
"{test}",
""
]
}
]
}
]
}
```

Overall, you can create rules of varying complexity, using comparisons between fields and static values.

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.
2 changes: 1 addition & 1 deletion 13/umbraco-forms/editor/creating-a-form/form-settings.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form Settings

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

To access the Form Settings:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions 13/umbraco-forms/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,38 @@ If you are upgrading to a new major version, you can find information about the

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

#### [**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)**

##### Validation rules across form fields

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".

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.

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.

Feedback on this feature in particular is welcome.

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).

##### Tracking editor activity

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).

##### Copy of workflows

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.

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).

##### Form picker enhancements

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).

##### File upload validation messages

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).

#### [**13.3.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.3.3) **(December 5th 2024)**

* 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).
Expand Down
1 change: 1 addition & 0 deletions 15/umbraco-forms/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

* [Creating a Form - The basics](editor/creating-a-form/README.md)
* [Form Settings](editor/creating-a-form/form-settings.md)
* [Form Advanced Options](editor/creating-a-form/form-advanced.md)
* [Form Information](editor/creating-a-form/form-info.md)
* [Overview Of The Field Types](editor/creating-a-form/fieldtypes/README.md)
* [Date](editor/creating-a-form/fieldtypes/date.md)
Expand Down
12 changes: 11 additions & 1 deletion 15/umbraco-forms/developer/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ For illustration purposes, the following structure represents the full set of op
"DisableClientSideValidationDependencyCheck": false,
"DisableRelationTracking": false,
"TrackRenderedFormsStorageMethod": "HttpContextItems",
"EnableMultiPageFormSettings": true
"EnableMultiPageFormSettings": true,
"EnableAdvancedValidationRules": false
},
"Security": {
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx",
Expand Down Expand Up @@ -446,6 +447,15 @@ This setting determines whether [multi-page form settings](../../editor/creating

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

## EnableAdvancedValidationRules

This setting determines whether [advanced form validation rules](../../editor/creating-a-form/form-advanced.md) are available to editors.

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.

To make the feature available to editors and include the dependency when using `@Html.RenderUmbracoFormDependencies(Url)`, set the value to `true`.


## Security configuration

### DisallowedFileUploadExtensions
Expand Down
98 changes: 98 additions & 0 deletions 15/umbraco-forms/editor/creating-a-form/form-advanced.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Form Advanced Options

In this article, you will find information about accessing the Forms Advanced Options and the features available to customize your Form.

To access the Form Advanced Options:

1. Navigate to the **Forms** section.
2. Open a Form you wish to customize.
3. Click **Advanced** in the top-right corner of the screen.

{% hint style="info" %}
The advanced options for forms are only available when [configured to display](../../developer/configuration/README.md#enableadvancedvalidationrules).
{% endhint %}

## Validation Rules

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".

![Validation rules](./images/validation-rules.png)

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.
eshanrnh marked this conversation as resolved.
Show resolved Hide resolved

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.

### Examples

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:

```json
{
"==": [
"{email}",
"{compareEmail}"
]
}
```

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:

```json
{
"or": [
{
"==": [
"{startDate}",
""
]
},
{
"==": [
"{endDate}",
""
]
},
{
">": [
"{endDate}",
"{startDate}"
]
}
]
}
```

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.

Check failure on line 65 in 15/umbraco-forms/editor/creating-a-form/form-advanced.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.Acronyms] 'AND' has no definition Raw Output: {"message": "[UmbracoDocs.Acronyms] 'AND' has no definition", "location": {"path": "15/umbraco-forms/editor/creating-a-form/form-advanced.md", "range": {"start": {"line": 65, "column": 323}}}, "severity": "ERROR"}

```json
{
"or": [
{
"==": [
"{choose}",
"A"
]
},
{
"and": [
{
"==": [
"{choose}",
"B"
]
},
{
"!=": [
"{test}",
""
]
}
]
}
]
}
```

Overall, you can create rules of varying complexity, using comparisons between fields and static values.

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.
2 changes: 1 addition & 1 deletion 15/umbraco-forms/editor/creating-a-form/form-settings.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form Settings

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

To access the Form Settings:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 15/umbraco-forms/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,40 @@ If you are upgrading to a new major version, you can find information about the

This section contains the release notes for Umbraco Forms 15 including all changes for this version.

#### [**15.1.0-rc1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.1.0) **(December 17th 2024)**

##### Validation rules across form fields

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".

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.

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.

Feedback on this feature in particular is welcome.

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).

##### Tracking editor activity

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 15.1 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).

##### Copy of workflows

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 15.1 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.

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).

##### File upload validation messages

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).

##### Other

Other bug fixes included in the release:

* Fixed issue with applying links to rich text settings on custom field or workflow types [#1329](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1329).

#### [**15.0.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.0.3) **(December 5th 2024)**

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