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

Docs updates for Umbraco Forms 10.2. #4281

Merged
merged 34 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
872ccf2
Added configuration details for data retention
AndyButland Aug 15, 2022
763f44e
Correct default values
AndyButland Aug 15, 2022
d4a55ca
Added detail of magic string format functions
AndyButland Sep 5, 2022
a348df8
Documented RemoveProvidedEmailTemplate config value
AndyButland Sep 5, 2022
3182f0c
Merge branch 'main' into forms/10.2
AndyButland Sep 18, 2022
dbdbfb2
Updated with details of FormElementHtmlIdPrefix configuration setting.
AndyButland Sep 18, 2022
3eab773
Merge branch 'main' into forms/10.2
AndyButland Sep 27, 2022
4d1a054
Added detail on RemoveProvidedFormsTemplates
AndyButland Sep 27, 2022
5069a62
Added details of AJAX forms feature
AndyButland Sep 27, 2022
2388654
Amends following linter review.
AndyButland Sep 27, 2022
23a8074
Updated developer content page.
AndyButland Sep 27, 2022
2b57599
Merge branch 'main' into forms/10.2
AndyButland Sep 27, 2022
8e5d1ed
Added details of umbFormsFormName filter
AndyButland Sep 27, 2022
a59a1b1
Add IPreValueTextFileStorage documentation
ronaldbarendse Sep 27, 2022
b8c38a3
Update API details
AndyButland Sep 28, 2022
c893563
Merge branch 'forms/10.2' of https://github.com/umbraco/UmbracoDocs i…
AndyButland Sep 28, 2022
a7a78d2
Added details of SettingsCustomization configuration setting
AndyButland Sep 30, 2022
fb789ad
Apply suggestions from code review
AndyButland Oct 12, 2022
b4c8957
Applied linter suggestions
AndyButland Oct 12, 2022
e20208e
Merge branch 'forms/10.2' of https://github.com/umbraco/UmbracoDocs i…
AndyButland Oct 12, 2022
2e93348
Attempt to resolve some vale warnings
sofietoft Oct 12, 2022
2995346
Fix vale error
sofietoft Oct 12, 2022
5f1cda4
Apply suggestions from code review
AndyButland Oct 12, 2022
c838d15
Further linter fixes
AndyButland Oct 12, 2022
bd1a652
Merge branch 'forms/10.2' of https://github.com/umbraco/UmbracoDocs i…
AndyButland Oct 12, 2022
e95aeb5
Apply suggestions from code review
AndyButland Oct 12, 2022
370ef78
Applied suggestion from code review.
AndyButland Oct 12, 2022
2766bef
Merge branch 'forms/10.2' of https://github.com/umbraco/UmbracoDocs i…
AndyButland Oct 12, 2022
3c419e7
Merge branch 'main' into forms/10.2
AndyButland Oct 12, 2022
5f65271
Fixed a couple of typos
AndyButland Oct 12, 2022
ad08f94
Merge branch 'main' into forms/10.2
ronaldbarendse Oct 21, 2022
755951f
Added missing heading.
AndyButland Oct 24, 2022
f7202ee
Apply suggestions from code review
AndyButland Oct 24, 2022
f3873fe
Merge branch 'forms/10.2' of https://github.com/umbraco/UmbracoDocs i…
AndyButland Oct 24, 2022
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
407 changes: 407 additions & 0 deletions Add-ons/UmbracoForms/Developer/AjaxForms/index.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions Add-ons/UmbracoForms/Developer/BlockListFilters/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
versionFrom: 10.0.0
meta.Title: "Block List Filters"
---

# Block List Filters

When working with the Block List editor, [the editor experience is enhanced](../../../Fundamentals/Backoffice/Property-Editors/Built-in-Property-Editors/Block-List-Editor/index.md#editor-appearance) by defining a label for the appearance of the Block.

These labels can contain AngularJS filters.

From Forms 10.2, a filter `umbFormsFormName` is available for use.

If you add a reference to a property containing a form to the block's label, it will render with the form's Id.

For example, assuming a property containing a picked form with an alias of `contactForm`:

```
{{contactForm}}
```

By using the filter as follows, the form's name will be displayed instead.

```
{{contactForm | umbFormsFormName}}
```

---

Prev: [Content Apps](../AjaxForms//index.md)
119 changes: 117 additions & 2 deletions Add-ons/UmbracoForms/Developer/Configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ For illustration purposes, the following structure represents the full set of op
"HideFieldValidationLabels": false,
"MessageOnSubmit": "Thank you",
"StoreRecordsLocally": true,
"AutocompleteAttribute": ""
"AutocompleteAttribute": "",
"DaysToRetainSubmittedRecordsFor": 0,
"DaysToRetainApprovedRecordsFor": 0
},
"RemoveProvidedEmailTemplate": false,
"FormElementHtmlIdPrefix": "",
"SettingsCustomization": {
"DataSourceTypes": {},
"FieldTypes": {},
"PrevalueSourceTypes": {},
"WorkflowTypes": {},
}
},
"Options": {
Expand All @@ -61,7 +71,12 @@ For illustration purposes, the following structure represents the full set of op
"AllowEditableFormSubmissions": false,
"AppendQueryStringOnRedirectAfterFormSubmission": false,
"CultureToUseWhenParsingDatesForBackOffice": "",
"TriggerConditionsCheckOn": "change"
"TriggerConditionsCheckOn": "change",
"ScheduledRecordDeletion": {
"Enabled": true,
"FirstRunTime": "",
"Period": "1.00:00:00"
}
},
"Security": {
"DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx",
Expand Down Expand Up @@ -113,6 +128,78 @@ When creating an empty form, a single workflow is added that will send an email

If you have created a custom template and would like to use that as the default instead, you can set the path here using this configuration setting.

### RemoveProvidedEmailTemplate
From Forms 10.2, the provided template can be removed from the selection if you have created email templates for the "send Razor email" workflow. To do this, set this value to `true`.

### RemoveProvidedFormsTemplates
Similarly, from Forms 10.2, the provided form templates available from the form creation dialog can be removed from selection. To do this, set this configuration value to `true`.

### FormElementHtmlIdPrefix
By default the value of HTML `id` attribute rendered for fieldsets and fields using the default theme is the GUID associated with the form element. Although [this is valid](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id), some browsers, particularly Safari, may report issues with this if the identifier begins with a number. To avoid such issues, from Forms 10.2, the attribute values can be prefixed with the value provided in this configuration element.

For example, providing a value of `"f_"` will apply a prefix of "f_" to each fieldset and field `id` attribute.

### SettingsCustomization
Forms 10.2 introduced the ability to configure settings for the field, workflow, data source, and prevalue sources. The default behavior, when a new field or workflow is added to a form, is for each setting to be empty. The values are then completed by the editor. All settings defined on the type are displayed for entry.

In some situations, you may want to hide certain settings from entry, so they always take an empty value. In others, you may want to provide a default value that the editor can accept or amend. And lastly, you may have a requirement for a fixed, non-empty value, that's enforced by the organization and not editable. Each of these scenarios can be supported by this configuration setting.

It consists of four dictionaries, one for each type:

- `DataSourceTypes`
- `FieldTypes`
- `PrevalueSourceTypes`
- `WorkflowTypes`

Each dictionary can be identified using the GUID or alias of the type as the key. The value is set to the following structure that contains three settings:

```json
{
"IsHidden": true|false,
"DefaultValue": "",
"IsReadOnly": true|false
}
```

- `IsHidden` - if provided and set to true the setting will be hidden and will always have an empty value.
- `DefaultValue` - if provided the value will be pre-filled when a type using it is created.
- `IsReadOnly` - used in conjunction with the above, if set the field won't be editable and hence whatever is set as the `DefaultValue` won't be able to be changed. If set to false (or omitted) the editor can change the value from the default.

In this example, the sender address field on a workflow for sending emails can be hidden, such that the system configured value is always used:

```json
"SettingsCustomization": {
"WorkflowTypes": {
"sendEmailWithRazorTemplate": {
"SenderEmail": {
"IsHidden": true
}
}
},
}
```

Here an organization-approved reCAPTCHA score threshold is defined, that can't be changed by editors:

```json
"SettingsCustomization": {
"FieldTypes": {
"recaptcha3": {
"ScoreThreshold": {
"DefaultValue": "0.8",
"IsReadOnly": true
}
}
},
}
```

In order to configure this setting, you will need to know the GUID or alias for the type and the property name for each setting. You can find [these values for the built-in Forms types here](./type-details.md).

Take care to not hide any settings that are required for the particular field or workflow type (for example, the `Subject` field for email workflows). If you do that, the item will fail validation when an editor tries to create it.

The default value and read-only settings apply to most setting types. There is an exception for complex ones where a default string value isn't appropriate. An example of one of these is the field mapper used in the "Send to URL" workflow.

### Form default settings configuration

The following configured values are applied to all forms as they are created. They can then be amended on a per-form basis via the Umbraco backoffice.
Expand Down Expand Up @@ -167,6 +254,16 @@ This setting needs to be a `True` or `False` value and will allow you to toggle

This setting provides a value to be used for the `autocomplete` attribute for newly created forms. By default the value is empty, but can be set to `on` or `off` to have that value applied as the attribute value used when rendering the form.

#### DaysToRetainSubmittedRecordsFor

Introduced in 10.2, this setting controls the initial value of the number of days to retain form submission records for newly created forms. By default the value is 0, which means records will not be deleted at any time and are retained forever.

If set to a positive number, a date value calculated by taking away the number of days configured from the current date is found. Records in the 'submitted' state, that are older than this date, will be flagged for removal.

#### DaysToRetainApprovedRecordsFor

Applies as per `DaysToRetainSubmittedRecordsFor` but for records in the 'approved' state.

## Package options configuration

### IgnoreWorkFlowsOnEdit
Expand Down Expand Up @@ -212,6 +309,24 @@ If no value is set, and no culture value was stored alongside the form entry, th

This configuration setting provides control over the client-side event used to trigger conditions. The `change` event is the default used if this setting is empty. It can also be set to a value of `input`. The main difference seen here relates to text fields, with the "input" event firing on each key press, and the "change" only when the field loses focus.

### ScheduledRecordDeletion

Scheduled deletion of records older than a specified number of days was a feature introduced in Forms 10.2. It uses a background task to run the cleanup operation, which can be customized with the following settings.

#### Enabled

By default this value is `false` and no data will be removed. Even if forms are configured to have submitted data cleaned up, no records will be deleted. A note will be displayed in the backoffice indicating this status.

Set to `true` to enabled the background task.

#### FirstRunTime

This will configure when the record deletion process will run for the first time. If the value is not configured the health checks will run after a short delay following the website start. The value is specified as a string in crontab format. For example, a value of `"* 4 * * *"` will first run the operation at 4 a.m.

#### Period

Defines how often the record deletion process will run. The default value is `1.00:00:00` which is equivalent to once every 24 hours. Shorter or longer periods can be set using different datetime strings.

## Security configuration

### DisallowedFileUploadExtensions
Expand Down
Loading