Skip to content

Commit b9bd789

Browse files
committed
Merge branch 'forms/release-notes-13.4.0-rc1-and-15.1.0-rc1' of https://github.com/AndyButland/UmbracoDocs into forms/release-notes-13.4.0-rc1-and-15.1.0-rc1
# Conflicts: # 13/umbraco-forms/editor/creating-a-form/form-advanced.md
2 parents d68c0b0 + 9d3d02b commit b9bd789

File tree

6 files changed

+48
-15
lines changed

6 files changed

+48
-15
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,9 @@ To make the feature available to editors set the value to `true`.
461461

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

464-
By default the value is `false`. This partly because the feature is considered something only for "power users", comfortable with crafting rules using the JSON syntax required. And partly as validating the rules on the client requires an additional front-end dependency.
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.
465465

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

468468
## Security configuration
469469

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The advanced options for forms are only available when [configured to display](.
1414

1515
## Validation Rules
1616

17-
When creating forms you are able to add validation to individual fields, making them mandatory or applying a regular expression pattern. Via the advanced options, you can provide validation rules for the entire form. 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".
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".
1818

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

@@ -62,7 +62,7 @@ A slightly more complex example could be with two dates, where, if provided, you
6262
}
6363
```
6464

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 craft a rule that is valid only if A is selected OR B is selected AND `test` is completed.
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.
6666

6767
```json
6868
{
@@ -93,6 +93,6 @@ Rules can be nested too. In this final illustrative example, we have two fields.
9393
}
9494
```
9595

96-
Overall you should be able to create simple or more complex rules as needed, using comparisons between fields and with static values.
96+
Overall, you can create rules of varying complexity, using comparisons between fields and static values.
9797

98-
When the form is rendered, these validation rules will be applied both client and server-side. In this way you can ensure the submission is only accepted if it meets the requirements.
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/release-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Whilst previously we tracked and displayed the date a form was created and last
3636

3737
##### Copy of workflows
3838

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

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). But if you copied the form and chose to exclude copying workflows, 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).
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).
4242

4343
##### Form picker enhancements
4444

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,9 @@ By default the value is `true`. To disable the feature, set the value to `false`
451451

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

454-
By default the value is `false`. This partly because the feature is considered something only for "power users", comfortable with crafting rules using the JSON syntax required. And partly as validating the rules on the client requires an additional front-end dependency.
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.
455455

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

458458

459459
## Security configuration

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

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ The advanced options for forms are only available when [configured to display](.
1414

1515
## Validation Rules
1616

17-
When creating forms you are able to add validation to individual fields, making them mandatory or applying a regular expression pattern. Via the advanced options, you can provide validation rules for the entire form. 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".
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".
1818

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

2121
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.
2222

2323
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.
2424

25+
### Examples
26+
2527
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:
2628

2729
```json
@@ -60,6 +62,37 @@ A slightly more complex example could be with two dates, where, if provided, you
6062
}
6163
```
6264

63-
Overall you should be able to create simple or more complex rules as needed, using comparisons between fields and with static values.
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.
6497

65-
When the form is rendered, these validation rules will be applied both client and server-side. In this way you can ensure the submission is only accepted if it meets the requirements.
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/release-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ Whilst previously we tracked and displayed the date a form was created and last
3838

3939
##### Copy of workflows
4040

41-
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.
41+
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.
4242

43-
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). But if you copied the form and chose to exclude copying workflows, 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).
43+
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).
4444

4545
##### File upload validation messages
4646

0 commit comments

Comments
 (0)