Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fbf44b4
Added details on SupportsHtml setting attribute property.
AndyButland Jun 4, 2024
91da8ee
Added release notes for Forms 14.0.2
AndyButland Jun 11, 2024
24aebc5
Added release notes for 13.2 and 14.1.
AndyButland Jun 21, 2024
afd0d6f
Added details of additional placeholder format functions.
AndyButland Jun 21, 2024
44840e1
Added details of SupportsHtml setting attribute.
AndyButland Jun 21, 2024
ca92d1c
Added details and release notes on the provision of additional data w…
AndyButland Jun 21, 2024
4538ced
Fixed issue link.
AndyButland Jun 21, 2024
84e72b8
Added additional item in release notes.
AndyButland Jul 1, 2024
60887a0
Updated release notes.
AndyButland Jul 1, 2024
53dc185
Merge branch 'forms/14.0.2-release-notes' into forms/13.2-14.1-release
AndyButland Jul 2, 2024
024a2f1
Tidy up.
AndyButland Jul 2, 2024
45944c7
Linting.
AndyButland Jul 2, 2024
6be5d3d
Removed reference to reverted feature.
AndyButland Jul 2, 2024
47e868c
Updated release notes.
AndyButland Jul 2, 2024
e8a4c1b
Further release notes.
AndyButland Jul 2, 2024
55c32af
Updated release notes.
AndyButland Jul 2, 2024
6ccf473
Updated type details.
AndyButland Jul 2, 2024
0426a69
Added setting type details.
AndyButland Jul 2, 2024
73596a5
Added patch release notes and updated minors to first be released as …
AndyButland Jul 2, 2024
b602596
Updated release notes.
AndyButland Jul 8, 2024
516f7e0
Update 10/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
1bb69fc
Update 10/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
ee1e466
Update 13/umbraco-forms/developer/ajaxforms.md
eshanrnh Jul 8, 2024
9efd453
Update 13/umbraco-forms/developer/ajaxforms.md
eshanrnh Jul 8, 2024
28040f7
Update 13/umbraco-forms/developer/extending/setting-types.md
eshanrnh Jul 8, 2024
6c713ba
Update 14/umbraco-forms/developer/extending/setting-types.md
eshanrnh Jul 8, 2024
53b3482
Update 14/umbraco-forms/developer/extending/setting-types.md
eshanrnh Jul 8, 2024
1786a88
Update 14/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
a690d2d
Update 13/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
3136091
Update 13/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
0df1f55
Update 13/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
52a2b9e
Update 14/umbraco-forms/developer/ajaxforms.md
eshanrnh Jul 8, 2024
f4d1c63
Update 14/umbraco-forms/developer/extending/setting-types.md
eshanrnh Jul 8, 2024
37d97c7
Update 13/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
d3a0960
Update 14/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
4f539db
Update 13/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
3c614cd
Update 14/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
9d890e9
Update 13/umbraco-forms/release-notes.md
eshanrnh Jul 8, 2024
50de533
Update theme link
AndyButland Jul 9, 2024
f002926
Merge branch 'forms/13.2-14.1-release' of https://github.com/AndyButl…
AndyButland Jul 9, 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
2 changes: 1 addition & 1 deletion 10/umbraco-forms/developer/extending/adding-a-fieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ To reference the file the setting should be configured with a full path to the v
[Setting("My Setting",
Description = "Help text for the setting",
View = "~/App_Plugins/UmbracoFormsCustomFields/backoffice/Common/SettingTypes/mycustomsettingfield.html",
SupportsPlaceholders = "true"
SupportsPlaceholders = true
DisplayOrder = 10)]
public string MySetting { get; set; }
```
Expand Down
2 changes: 1 addition & 1 deletion 10/umbraco-forms/developer/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Umbraco 10+ distributes these files as part of a Razor class library, so you won

You can obtain the latest version of the default theme Forms 10 from the following link:

* [Forms 10 Default Theme](https://umbra.co/umbraco-forms-default-theme) (for 10.5.5 and above)
* [Forms 10 Default Theme](https://umbra.co/umbraco-forms-default-theme) (for 10.5.6 and above)

If you are using a lower minor version of Forms than those listed, you should download an older version of the default theme.

Expand Down
7 changes: 7 additions & 0 deletions 10/umbraco-forms/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ This section contains the release notes for Umbraco Forms 8 and 10 including all

<summary>Version 10</summary>

[**10.5.6**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.6) **(July 9th 2024)**

* Fixed issue with save button UI, when save is canceled via a notification [#1219](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1219).
* Improved date format for data values when using the **Send email** workflow [#1214](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1214).
* Removed unnecessary circular checks for conditions on workflows resolving an issue where workflow would trigger when conditions were not met [#1206](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1206).
* Fixed console error with blank values in data picker fields [#1241](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1241).

[**10.5.5**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.5) **(April 16th 2024)**

* Corrected alignment of label `for` and input `id` attributes in the date picker field [#1200](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1200).
Expand Down
2 changes: 1 addition & 1 deletion 12/umbraco-forms/developer/extending/adding-a-fieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ To reference the file the setting should be configured with a full path to the v
[Setting("My Setting",
Description = "Help text for the setting",
View = "~/App_Plugins/UmbracoFormsCustomFields/backoffice/Common/SettingTypes/mycustomsettingfield.html",
SupportsPlaceholders = "true"
SupportsPlaceholders = true
DisplayOrder = 10)]
public virtual string MySetting { get; set; }
```
Expand Down
48 changes: 36 additions & 12 deletions 13/umbraco-forms/.gitbook/assets/umbraco_forms_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,22 @@
"schema": {
"type": "string"
}
},
{
"name": "additionalData",
"in": "query",
"description": "Additional data provided when rendering the form.",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
],
"responses": {
"200": {
"description": "Success",
"description": "OK",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -124,7 +135,7 @@
}
},
"422": {
"description": "Client Error",
"description": "Unprocessable Content",
"content": {
"application/json": {
"schema": {
Expand All @@ -144,16 +155,14 @@
"Show",
"Hide"
],
"type": "integer",
"format": "int32"
"type": "string"
},
"FieldConditionLogicType": {
"enum": [
"All",
"Any"
],
"type": "integer",
"format": "int32"
"type": "string"
},
"FieldConditionRuleOperator": {
"enum": [
Expand All @@ -162,11 +171,19 @@
"GreaterThen",
"LessThen",
"Contains",
"ContainsIgnoreCase",
"StartsWith",
"EndsWith"
"StartsWithIgnoreCase",
"EndsWith",
"EndsWithIgnoreCase",
"NotContains",
"NotContainsIgnoreCase",
"NotStartsWith",
"NotStartsWithIgnoreCase",
"NotEndsWith",
"NotEndsWithIgnoreCase"
],
"type": "integer",
"format": "int32"
"type": "string"
},
"FormConditionDto": {
"type": "object",
Expand Down Expand Up @@ -285,6 +302,13 @@
"culture": {
"type": "string",
"nullable": true
},
"additionalData": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
}
},
"additionalProperties": false
Expand All @@ -305,7 +329,8 @@
},
"placeholder": {
"type": "string",
"nullable": true
"nullable": true,
"deprecated": true
},
"cssClass": {
"type": "string",
Expand Down Expand Up @@ -359,8 +384,7 @@
"MarkMandatoryFields",
"MarkOptionalFields"
],
"type": "integer",
"format": "int32"
"type": "string"
},
"FormFieldPrevalueDto": {
"type": "object",
Expand Down
12 changes: 10 additions & 2 deletions 13/umbraco-forms/developer/ajaxforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The Open API specification is available from: `/umbraco/swagger/forms/swagger.js
To request the definition of a form, the following request can be made:

```none
GET /umbraco/forms/api/v1/definitions/{id}?contentId={contentId}&culture={culture}
GET /umbraco/forms/api/v1/definitions/{id}?contentId={contentId}&culture={culture}&additionalData[{key}]={value}&additionalData[key2]={value2}
```

The GET request requires the Guid identifying the form.
Expand All @@ -52,6 +52,8 @@ An optional `contentId` parameter can be provided, which can either be the integ

A `culture` parameter can also be provided, expected as an ISO code identifying a language used in the Umbraco installation (for example, `en-US`). This will be used to ensure the correct translation for dictionary keys is used. It will also retrieve page content from the appropriate language variant. If the parameter is not provided in the request, the default Umbraco language will be used.

Finally, an `additionalData` parameter can be provided as a dictionary. This information will be made available when rendering the form allowing it to be used as a source for ["magic string" replacements](./magic-strings.md).

If the requested form is not found, a 404 status code will be returned.

A successful request will return a 200 status code. An example response is as follows. It will differ depending on the pages, fields and other settings available for the form.
Expand Down Expand Up @@ -398,14 +400,20 @@ It also requires a `Content-Type` header of `application/json` and accepts a bod
"dataConsent": "on"
},
"contentId": "ca4249ed-2b23-4337-b522-63cabe5587d1",
"culture": "en-US"
"culture": "en-US",
"additionalData": {
"foo": "bar",
"baz": "buzz",
}
}
```

The `values` collection consists of a set of name/value pairs, where the name is the alias of a form field. The value is the value of the submitted field, which can either be a string, or an array of strings. In this way we support fields that accept multiple values, such as checkbox lists.

The `contentId` and `culture` parameters are optional. If provided they will be used to customize the response for the current page and language respectively.

Similarly, the `additionalData` dictionary is optional. This data is associated with the created record and made available within workflows.

In the case of a validation error, a 422 "Unprocessable Entity" status code will be returned, along with a response similar to the following:

```json
Expand Down
2 changes: 2 additions & 0 deletions 13/umbraco-forms/developer/configuration/type-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ The intention is to be able to make available details such as IDs, aliases and p

**Settings:**

* `DisplayLayout`
* `DefaultValue`
* `ShowLabel`

Expand Down Expand Up @@ -206,6 +207,7 @@ The intention is to be able to make available details such as IDs, aliases and p

**Settings:**

* `DisplayLayout`
* `DefaultValue`
* `ShowLabel`

Expand Down
4 changes: 3 additions & 1 deletion 13/umbraco-forms/developer/extending/adding-a-fieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ To reference the file the setting should be configured with a full path to the v
[Setting("My Setting",
Description = "Help text for the setting",
View = "~/App_Plugins/UmbracoFormsCustomFields/backoffice/Common/SettingTypes/mycustomsettingfield.html",
SupportsPlaceholders = "true"
SupportsPlaceholders = true,
DisplayOrder = 10)]
public virtual string MySetting { get; set; }
```
Expand All @@ -174,6 +174,8 @@ public virtual string MySetting { get; set; }

`HtmlEncodeReplacedPlaceholderValues` takes effect only if `SupportsPlaceholders` is `true`. It controls whether the replaced placeholder values should be HTML encoded (as is necessary for rendering within content from a rich text editor).

`SupportsHtml` is a flag indicating whether the setting can contain HTML content. When set to `true` it will be treated as HTML content when the value is read from the Forms delivery API.

`IsMandatory` if set to `true` will provide client-side validation in the backoffice to ensure the value is completed.

### Settings when inheriting
Expand Down
4 changes: 2 additions & 2 deletions 13/umbraco-forms/developer/extending/setting-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ The following setting types are available and are used for the field, prevalue s
| Name | Description | Used in |
|---------------------------|-------------------------------------------------------------------|-------------------------------------------------|
| Checkbox | Uses a single checkbox for entry | |
| DocumentMapper | Used for selection of a documenttype | The "Save as Umbraco node" workflow |
| DocumentMapper | Used for selection of a documenttype | The "Save as Umbraco node" workflow |
| Dropdownlist | Used for selection from a list of options | |
| EmailTemplatePicker | Used for selection of an email template | The "Send email with Razor template" workflow |
| FieldMapper | Used to map fields from a form to required aliases | The "Send to URL" workflow |
| File | Used for selection of a file | The "Send email with XSLT template" workflow |
| MultipleTextString | Uses multiple text boxes for entry | Not used in core types |
| NumericField | Uses numerical text box for entry | |
| Password | Uses password text box for entry | |
| PasswordNoAutocomplete | Uses password text box for entry (with autocomplete disabled) | |
Expand All @@ -38,7 +39,6 @@ The following setting types are available and are used for the field, prevalue s
| Textfield | Used a single-line textbox for entry | |
| TextfieldNoAutocomplete | Used a single-line textbox for entry (with autocomplete disabled) | |
| TextWithFieldPicker | Used a single-line textbox/form field list for entry | Not used in core types |
| MultipleTextString | Used multiple textboxes for multiple entries | Not used in core types |

All of the above setting types are used in one or more field, prevalue source and workflow types available with Umbraco Forms. For the less common ones, a usage has been indicated in the table.

Expand Down
27 changes: 17 additions & 10 deletions 13/umbraco-forms/developer/magic-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Some extra variables are:

`[$myRecursiveItem]` this allows you to parse the Umbraco Document Type property myRecursiveItem. So if the current page does not contain a value for this then it will request it from the parent up until the root or until it finds a value.

### Additional data

When rendering a form, additional data can be provided in the form of a dictionary. As well as being associated with the created record and available within workflows, they can be used for "magic string" replacements.

They are accessed using this syntax: `[+additionalDataKey]`.

### Umbraco Form field

`{myAliasForFormField}` this allows you to display the entered value for that specific field from the form submission. Used in workflows to send an automated email back to the customer based on the email address submitted in the form. The value here needs to be the alias of the field, and not the name of the field.
Expand Down Expand Up @@ -82,16 +88,17 @@ For example, to truncate a string value read from an Umbraco page field with ali

Umbraco Forms ships with the following filters:

| Filter | Function | Arguments | Example |
| ----------------------------- | ---------- | -------------------- | ------------------------------------ |
| Bound a number | `bound` | min and max bound | `[#field \| bound: 1: 10]` |
| Convert string to lower case | `lower` | | `[#field \| lower]` |
| Convert string to upper case | `upper` | | `[#field \| upper]` |
| Truncate a string | `truncate` | number of characters | `[#field \| truncate: 10]` |
| Format a number | `number` | format string | `[#field \| number: #0.##%]` |
| Format a number as a currency | `currency` | | `[#field \| currency]` |
| Format a date | `date` | format string | `[#field \| date: dd-MM-yyyy HH:mm]` |
| HTML encode a string | `html` | | `[#field \| html]` |
| Filter | Function | Arguments | Example |
| ------------------------------------------------ | ----------------------- | -------------------- | ---------------------------------------------------- |
| Bound a number | `bound` | min and max bound | `[#field \| bound: 1: 10]` |
| Convert string to lower case | `lower` | | `[#field \| lower]` |
| Convert string to upper case | `upper` | | `[#field \| upper]` |
| Format a number | `number` | format string | `[#field \| number: #0.##%]` |
| Format a number as a currency | `currency` | | `[#field \| currency]` |
| Format a date | `date` | format string | `[#field \| date: dd-MM-yyyy HH:mm]` |
| HTML encode a string | `html` | | `[#field \| html]` |
| Truncate a string | `truncate` | number of characters | `[#field \| truncate: 10]` |


The format strings used for formatting dates and numbers are the standard or custom .NET [date](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings) and [numeric](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings) format strings respectively.

Expand Down
9 changes: 6 additions & 3 deletions 13/umbraco-forms/developer/rendering-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ To display a form in your view, you can make a call to a view component:
@await Component.InvokeAsync("RenderForm", new { formId = Guid.Parse("<form guid>"), theme = "default", includeScripts = false })
```

Five parameters can be provided:
Six parameters can be provided:

- `formId` is the GUID of a form.
- `theme` is the name of a theme. If not provided, the default theme is used (see [Themes](./themes.md)).
- `includeScripts` indicates whether scripts should be rendered with the form (see [Rendering Scripts](./rendering-scripts.md).
- `recordId` is an optional existing record GUID, used if editing records via the website is [enabled in configuration](../developer/configuration/README.md#alloweditableformsubmissions)
- `redirectToPageId` is an optional GUID for a content page that, if provided, is redirected to once the form has been submitted. It will be used in preference to post-submission behavior defined on the form itself.
- `additionalData` is an optional dictionary of string values. When provided it will be used as a source for ["magic string" replacements](./magic-strings.md). The data will be associated with the created record and made available for custom logic or update within workflows.

Usually, rather than hard-coding the form's GUID and other details, you'll use a form, theme or content picker on your page:

```csharp
@await Component.InvokeAsync("RenderForm", new { formId = @Model.Form, theme = @Model.Theme, includeScripts = false })
var additionalData = new Dictionary<string, string> { { "foo", "bar" }, { "buzz", "baz" } };
@await Component.InvokeAsync("RenderForm", new { formId = @Model.Form, theme = @Model.Theme, includeScripts = false, additionalData })
```

## Rendering Using a Tag Helper
Expand All @@ -43,7 +45,8 @@ Then in your view you can use:
```csharp
@if (Model.Form.HasValue)
{
<umb-forms-render form-id="@Model.FormId.Value" theme="@Model.FormTheme" exclude-scripts="true" />
var additionalData = new Dictionary<string, string> { { "foo", "bar" }, { "buzz", "baz" } };
<umb-forms-render form-id="@Model.FormId.Value" theme="@Model.FormTheme" exclude-scripts="true" additional-data="@additionalData" />
}
```

Expand Down
Loading