diff --git a/10/umbraco-forms/.gitbook.yaml b/10/umbraco-forms/.gitbook.yaml deleted file mode 100644 index 8865254d413..00000000000 --- a/10/umbraco-forms/.gitbook.yaml +++ /dev/null @@ -1,10 +0,0 @@ -root: ./ - -​structure: - readme: README.md - summary: SUMMARY.md - -redirects: - the-licensing-model: installation/the-licensing-model.md - installation/manualupgrade: upgrading/manualupgrade.md - installation/version-specific: upgrading/version-specific.md diff --git a/10/umbraco-forms/.gitbook/assets/Blog_post_for_com_900x400px_1_8_7_ (1).png b/10/umbraco-forms/.gitbook/assets/Blog_post_for_com_900x400px_1_8_7_ (1).png deleted file mode 100644 index 2a8c064f60e..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/Blog_post_for_com_900x400px_1_8_7_ (1).png and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/Blog_post_for_com_900x400px_1_8_7_.png b/10/umbraco-forms/.gitbook/assets/Blog_post_for_com_900x400px_1_8_7_.png deleted file mode 100644 index 2a8c064f60e..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/Blog_post_for_com_900x400px_1_8_7_.png and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/FormSettingsDataRetention.png b/10/umbraco-forms/.gitbook/assets/FormSettingsDataRetention.png deleted file mode 100644 index 9021062ac0a..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/FormSettingsDataRetention.png and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/FormSettingsFieldsDisplayed.png b/10/umbraco-forms/.gitbook/assets/FormSettingsFieldsDisplayed.png deleted file mode 100644 index 18cc4170619..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/FormSettingsFieldsDisplayed.png and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/Umbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80 (1).jpg b/10/umbraco-forms/.gitbook/assets/Umbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80 (1).jpg deleted file mode 100644 index d12b2963fc0..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/Umbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80 (1).jpg and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/Umbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80.jpg b/10/umbraco-forms/.gitbook/assets/Umbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80.jpg deleted file mode 100644 index d12b2963fc0..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/Umbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80.jpg and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/_packageBlog_post_for_com_900x400px (1).png b/10/umbraco-forms/.gitbook/assets/_packageBlog_post_for_com_900x400px (1).png deleted file mode 100644 index 824e289115a..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/_packageBlog_post_for_com_900x400px (1).png and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/_packageBlog_post_for_com_900x400px.png b/10/umbraco-forms/.gitbook/assets/_packageBlog_post_for_com_900x400px.png deleted file mode 100644 index 824e289115a..00000000000 Binary files a/10/umbraco-forms/.gitbook/assets/_packageBlog_post_for_com_900x400px.png and /dev/null differ diff --git a/10/umbraco-forms/.gitbook/assets/umbraco_forms_swagger.json b/10/umbraco-forms/.gitbook/assets/umbraco_forms_swagger.json deleted file mode 100644 index 8222d8f3559..00000000000 --- a/10/umbraco-forms/.gitbook/assets/umbraco_forms_swagger.json +++ /dev/null @@ -1,663 +0,0 @@ -{ - "x-generator": "NSwag v13.17.0.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v13.0.0.0))", - "openapi": "3.0.0", - "info": { - "title": "Umbraco Forms API", - "description": "Describes the Umbraco Forms API available for rendering and posting client-side forms.", - "version": "1.0.0" - }, - "servers": [ - { - "url": "https://localhost:44336" - } - ], - "paths": { - "/umbraco/forms/api/v1.0/definitions/{id}": { - "get": { - "tags": [ - "Forms" - ], - "summary": "Retrieves a single form by Id.", - "operationId": "Definitions_GetById", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - }, - "x-position": 1 - }, - { - "name": "contentId", - "in": "query", - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 2 - }, - { - "name": "culture", - "in": "query", - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 3 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FormDto" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - } - } - }, - "/umbraco/forms/api/v1.0/entries/{id}": { - "post": { - "tags": [ - "Forms" - ], - "summary": "Processes a submission for a form.", - "operationId": "Entries_SubmitEntry", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "guid" - }, - "x-position": 1 - } - ], - "requestBody": { - "x-name": "entry", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FormEntryDto" - } - } - }, - "required": true, - "x-position": 2 - }, - "responses": { - "202": { - "description": "" - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "FormDto": { - "type": "object", - "description": "Defines a form object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "Gets or sets the form's ID.", - "format": "guid" - }, - "name": { - "type": "string", - "description": "Gets or sets the form's name." - }, - "indicator": { - "type": "string", - "description": "Gets or sets the form's indicator for mandatory fields." - }, - "cssClass": { - "type": "string", - "description": "Gets or sets the form's CSS class.", - "nullable": true - }, - "nextLabel": { - "type": "string", - "description": "Gets or sets the form's label for the next page button.", - "nullable": true - }, - "previousLabel": { - "type": "string", - "description": "Gets or sets the form's label for the previous page button.", - "nullable": true - }, - "submitLabel": { - "type": "string", - "description": "Gets or sets the form's button submit label.", - "nullable": true - }, - "disableDefaultStylesheet": { - "type": "boolean", - "description": "Gets or sets a value indicating whether to disable the form's default stylesheet." - }, - "fieldIndicationType": { - "description": "Gets or sets the form's field mandatory or optional field indication type.", - "oneOf": [ - { - "$ref": "#/components/schemas/FormFieldIndication" - } - ] - }, - "hideFieldValidation": { - "type": "boolean", - "description": "Gets or sets a value indicating whether to hide field validation." - }, - "messageOnSubmit": { - "type": "string", - "description": "Gets or sets the form's message to display on submission.", - "nullable": true - }, - "messageOnSubmitIsHtml": { - "type": "boolean", - "description": "Gets or sets a value indicating whether the form's message to display on submission is in HTML format." - }, - "showValidationSummary": { - "type": "boolean", - "description": "Gets or sets a value indicating whether to show the form's validation summary." - }, - "gotoPageOnSubmit": { - "type": "string", - "description": "Gets or sets the form's page to redirect to following submission.", - "format": "guid", - "nullable": true - }, - "pages": { - "type": "array", - "description": "Gets or sets the form's pages.", - "items": { - "$ref": "#/components/schemas/FormPageDto" - } - } - } - }, - "FormFieldIndication": { - "type": "integer", - "description": "Enumeration for field indications.", - "x-enumNames": [ - "NoIndicator", - "MarkMandatoryFields", - "MarkOptionalFields" - ], - "enum": [ - 0, - 1, - 2 - ] - }, - "FormPageDto": { - "type": "object", - "description": "Defines a form's page object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "caption": { - "type": "string", - "description": "Gets or sets the form page's caption.", - "nullable": true - }, - "condition": { - "description": "Gets or sets the form page's condition.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/FormConditionDto" - } - ] - }, - "fieldsets": { - "type": "array", - "description": "Gets or sets the form page's fieldsets.", - "items": { - "$ref": "#/components/schemas/FormFieldsetDto" - } - } - } - }, - "FormConditionDto": { - "type": "object", - "description": "Defines a form's condition object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "actionType": { - "description": "Gets or sets the form condition's action type.", - "oneOf": [ - { - "$ref": "#/components/schemas/FieldConditionActionType" - } - ] - }, - "logicType": { - "description": "Gets or sets the form condition's logic type.", - "oneOf": [ - { - "$ref": "#/components/schemas/FieldConditionLogicType" - } - ] - }, - "rules": { - "type": "array", - "description": "Gets or sets the form condition's rules.", - "items": { - "$ref": "#/components/schemas/FormConditionRuleDto" - } - } - } - }, - "FieldConditionActionType": { - "type": "integer", - "description": "Enumeration for field condition display options.", - "x-enumNames": [ - "Show", - "Hide" - ], - "enum": [ - 0, - 1 - ] - }, - "FieldConditionLogicType": { - "type": "integer", - "description": "Enumeration for field condition logic matches.", - "x-enumNames": [ - "All", - "Any" - ], - "enum": [ - 0, - 1 - ] - }, - "FormConditionRuleDto": { - "type": "object", - "description": "Defines a form condition's rule object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "field": { - "type": "string", - "description": "Gets or sets fhe form condition rules's field." - }, - "operator": { - "description": "Gets or sets fhe form condition rules's operator.", - "oneOf": [ - { - "$ref": "#/components/schemas/FieldConditionRuleOperator" - } - ] - }, - "value": { - "type": "string", - "description": "Gets or sets fhe form condition rules's value." - } - } - }, - "FieldConditionRuleOperator": { - "type": "integer", - "description": "Enumeration for field condition rule operators.", - "x-enumNames": [ - "Is", - "IsNot", - "GreaterThen", - "LessThen", - "Contains", - "StartsWith", - "EndsWith" - ], - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ] - }, - "FormFieldsetDto": { - "type": "object", - "description": "Defines a form's fieldset object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "Gets or sets the form fieldset's ID.", - "format": "guid" - }, - "caption": { - "type": "string", - "description": "Gets or sets the form fieldset's caption.", - "nullable": true - }, - "condition": { - "description": "Gets or sets the form fieldset's condition.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/FormConditionDto" - } - ] - }, - "columns": { - "type": "array", - "description": "Gets or sets the form fieldset's columns.", - "items": { - "$ref": "#/components/schemas/FormFieldsetColumnDto" - } - } - } - }, - "FormFieldsetColumnDto": { - "type": "object", - "description": "Defines a form fieldset's column (or container) object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "caption": { - "type": "string", - "description": "Gets or sets the form fieldset column's caption.", - "nullable": true - }, - "width": { - "type": "integer", - "description": "Gets or sets the form fieldset column's width.", - "format": "int32" - }, - "fields": { - "type": "array", - "description": "Gets or sets the form fieldset column's fields.", - "items": { - "$ref": "#/components/schemas/FormFieldDto" - } - } - } - }, - "FormFieldDto": { - "type": "object", - "description": "Defines a form's field object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "Gets or sets the form field's ID.", - "format": "guid" - }, - "caption": { - "type": "string", - "description": "Gets or sets the form field's catpion." - }, - "helpText": { - "type": "string", - "description": "Gets or sets the form field's help text.", - "nullable": true - }, - "placeholder": { - "type": "string", - "description": "Gets or sets the form field's placeholder.", - "nullable": true - }, - "cssClass": { - "type": "string", - "description": "Gets or sets the form field's CSS class.", - "nullable": true - }, - "alias": { - "type": "string", - "description": "Gets or sets the form field's alias." - }, - "required": { - "type": "boolean", - "description": "Gets or sets a value indicating whether the form field is required to be completed." - }, - "requiredErrorMessage": { - "type": "string", - "description": "Gets or sets the form field's message to display if the required field is not completed.", - "nullable": true - }, - "pattern": { - "type": "string", - "description": "Gets or sets the form field's validation pattern (regular expression).", - "nullable": true - }, - "patternInvalidErrorMessage": { - "type": "string", - "description": "Gets or sets the form field's message to display if the field does not match the provided pattern.", - "nullable": true - }, - "condition": { - "description": "Gets or sets the form field's condition.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/FormConditionDto" - } - ] - }, - "fileUploadOptions": { - "description": "Gets or sets the form field's file upload options.", - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/FormFileUploadOptionsDto" - } - ] - }, - "preValues": { - "type": "array", - "description": "Gets or sets the form field's prevalues.", - "items": { - "$ref": "#/components/schemas/FormFieldPrevalueDto" - } - }, - "settings": { - "type": "object", - "description": "Gets or sets the form field's settings.", - "additionalProperties": { - "type": "string" - } - }, - "type": { - "description": "Gets or sets the form field's type.", - "oneOf": [ - { - "$ref": "#/components/schemas/FormFieldTypeDto" - } - ] - } - } - }, - "FormFileUploadOptionsDto": { - "type": "object", - "description": "Defines a form's file upload options object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "allowAllUploadExtensions": { - "type": "boolean", - "description": "Gets or sets a value indicating whether all file extensions are allowed." - }, - "allowedUploadExtensions": { - "type": "array", - "description": "Gets or sets the allowed file extensions.", - "items": { - "type": "string" - } - }, - "allowMultipleFileUploads": { - "type": "boolean", - "description": "Gets or sets a value indicating whether multiple file uploads are allowed." - } - } - }, - "FormFieldPrevalueDto": { - "type": "object", - "description": "Defines a form field's prevalue object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "value": { - "type": "string", - "description": "Gets or sets the form field prevalue's value." - }, - "caption": { - "type": "string", - "description": "Gets or sets the form field prevalue's caption.", - "nullable": true - } - } - }, - "FormFieldTypeDto": { - "type": "object", - "description": "Defines a form's field type object exposed by the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "description": "Gets or sets the form type's ID.", - "format": "guid" - }, - "name": { - "type": "string", - "description": "Gets or sets the form type's name." - }, - "supportsPreValues": { - "type": "boolean", - "description": "Gets or sets a value indicating whether the form type's supports prevalues." - }, - "supportsUploadTypes": { - "type": "boolean", - "description": "Gets or sets a value indicating whether the form type's supports file uploads." - }, - "renderInputType": { - "type": "string", - "description": "Gets or sets a value indicating how the the field should be rendered, as a single input, multiple inputs within an an HTML fieldset (e.g. a radio button or check box list)." - } - } - }, - "ProblemDetails": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - } - } - }, - "FormEntryDto": { - "type": "object", - "description": "Defines a form entry submitted to the headless/AJAX API.", - "additionalProperties": false, - "properties": { - "values": { - "type": "object", - "description": "Gets or sets the form entry's values.", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "contentId": { - "type": "string", - "description": "Gets or sets an optional ID of the content page through which the form was submitted.", - "nullable": true - }, - "culture": { - "type": "string", - "description": "Gets or sets an optional culture code for which the form submission should be processed.", - "nullable": true - } - } - } - } - }, - "tags": [ - { - "name": "Forms" - } - ] -} \ No newline at end of file diff --git a/10/umbraco-forms/README.md b/10/umbraco-forms/README.md deleted file mode 100644 index 5301e0a64ba..00000000000 --- a/10/umbraco-forms/README.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -meta.Title: Umbraco Forms Documentation -description: >- - Documentation on how to work with Umbraco Forms for both editors and - developers ---- - -# Umbraco Forms Documentation - -Umbraco Forms is a tool that lets you build forms of all shapes and sizes and put them on your Umbraco websites. Build forms using a long list of elements like multiple choice, dropdowns, text areas and checkboxes. Choose between a series of different workflow and control what happens once a form has been submitted. - -[Purchase Umbraco Forms](https://umbraco.com/products/umbraco-forms/) or sign up for an [Umbraco Cloud](https://try.umbraco.com/) project where Umbraco Forms is part of the package. - -
Installing Umbraco FormsInstall Umbraco Forms in a few steps.install.md_packageBlog_post_for_com_900x400px.png
Creating a FormCreate new Forms and add them to your Umbraco site in minutes.creating-a-formBlog_post_for_com_900x400px_1_8_7_.png
Preparing your FrontendEnsure you have the necessary client dependencies before adding a Form to your site.prepping-frontend.mdUmbraco 9.3RC- Blog_post_for_com_900x400px_1@2x-80.jpg
- -{% embed url="https://www.youtube-nocookie.com/embed/3Aojbp_1MPc" %} - -## Quick Links - -{% content-ref url="upgrading/manualupgrade.md" %} -[manualupgrade.md](upgrading/manualupgrade.md) -{% endcontent-ref %} - -{% content-ref url="editor/attaching-workflows/" %} -[attaching-workflows](editor/attaching-workflows/) -{% endcontent-ref %} - -{% content-ref url="developer/forms-in-the-database.md" %} -[forms-in-the-database.md](developer/forms-in-the-database.md) -{% endcontent-ref %} diff --git a/10/umbraco-forms/SUMMARY.md b/10/umbraco-forms/SUMMARY.md deleted file mode 100644 index 2961e49cc80..00000000000 --- a/10/umbraco-forms/SUMMARY.md +++ /dev/null @@ -1,67 +0,0 @@ -# Table of contents - -* [Umbraco Forms Documentation](README.md) -* [Legacy Documentation](legacy-documentation.md) -* [Release Notes](release-notes.md) - -## Installation - -* [Installing Umbraco Forms](installation/install.md) -* [Licensing](installation/the-licensing-model.md) - -## Upgrading - -* [Upgrading Umbraco Forms](upgrading/manualupgrade.md) -* [Version Specific Upgrade Notes](upgrading/version-specific.md) -* [Migration IDs](upgrading/migration-ids.md) - -## Editor - -* [Creating a Form - The Basics](editor/creating-a-form/README.md) - * [Form Settings](editor/creating-a-form/form-settings.md) - * [Overview Of The Field Types](editor/creating-a-form/fieldtypes/README.md) - * [Date](editor/creating-a-form/fieldtypes/date.md) - * [File Upload](editor/creating-a-form/fieldtypes/fileupload.md) - * [reCAPTCHA V2](editor/creating-a-form/fieldtypes/recaptcha2.md) - * [reCAPTCHA V3](editor/creating-a-form/fieldtypes/recaptcha3.md) - * [Setting-up Conditional Logic on Fields](editor/creating-a-form/conditional-logic.md) -* [Attaching Workflows](editor/attaching-workflows/README.md) - * [Workflow Types](editor/attaching-workflows/workflow-types.md) -* [Viewing And Exporting Entries](editor/viewing-and-exporting-entries.md) -* [Defining And Attaching Prevalue Sources](editor/defining-and-attaching-prevaluesources/README.md) - * [Prevalue Source Types Overview](editor/defining-and-attaching-prevaluesources/prevalue-source-types.md) - -## Developer - -* [Preparing Your Frontend](developer/prepping-frontend.md) -* [Rendering Forms](developer/rendering-forms.md) -* [Rendering Forms Scripts](developer/rendering-scripts.md) -* [Themes](developer/themes.md) -* [Custom Markup](developer/custom-markup.md) -* [Email Templates](developer/email-templates.md) -* [Working With Record Data](developer/working-with-data.md) -* [Umbraco Forms in the Database](developer/forms-in-the-database.md) -* [Extending](developer/extending/README.md) - * [Adding A Type To The Provider Model](developer/extending/adding-a-type.md) - * [Adding A Field Type To Umbraco Forms](developer/extending/adding-a-fieldtype.md) - * [Excluding a built-in field](developer/extending/excluding-a-built-in-field.md) - * [Adding A Prevalue Source Type To Umbraco Forms](developer/extending/adding-a-prevaluesourcetype.md) - * [Adding A Workflow Type To Umbraco Forms](developer/extending/adding-a-workflowtype.md) - * [Adding An Export Type To Umbraco Forms](developer/extending/adding-a-exporttype.md) - * [Adding a Magic String Format Function](developer/extending/adding-a-magic-string-format-function.md) - * [Adding A Server-Side Notification Handler To Umbraco Forms](developer/extending/adding-an-event-handler.md) - * [Adding a Validation Pattern](developer/extending/adding-a-validation-pattern.md) - * [Customize Default Fields and Workflows For a Form](developer/extending/customize-default-workflows.md) -* [Configuration](developer/configuration/README.md) - * [Forms Provider Type Details](developer/configuration/type-details.md) -* [Security](developer/security.md) -* [Magic Strings](developer/magic-strings.md) -* [Health Checks](developer/healthchecks/README.md) - * [Apply keys and indexes](developer/healthchecks/apply-keys.md) - * [Apply keys and indexes for forms in the database](developer/healthchecks/forms-in-the-database-apply-keys.md) -* [Localization](developer/localization.md) -* [Content Apps](developer/contentapps.md) -* [Headless/AJAX Forms](developer/ajaxforms.md) -* [Block List Filters](developer/blocklistfilters.md) -* [Field Types](developer/field-types.md) -* [Storing Prevalue Text Files With IPreValueTextFileStorage](developer/iprevaluetextfilestorage.md) diff --git a/10/umbraco-forms/developer/ajaxforms.md b/10/umbraco-forms/developer/ajaxforms.md deleted file mode 100644 index 43b40143714..00000000000 --- a/10/umbraco-forms/developer/ajaxforms.md +++ /dev/null @@ -1,448 +0,0 @@ ---- -meta.Title: Headless/Asynchronous JavaScript and XML (AJAX) Forms ---- - -# Headless/AJAX Forms - -Umbraco Forms provides an API for client-side rendering and submission of forms. This will be useful when you want to handle forms in a headless style scenario. - -## Enabling the API - -The Forms API is disabled by default. To enable it, set the `Umbraco:Forms:Options:EnableFormsApi` configuration key to `true`. - -For example: - -```json - "Umbraco": { - "Forms": { - "Options": { - "EnableFormsApi": true - } - } - } -``` - -## API Definition - -The API supports two endpoints, one for rendering a form and one for submitting it. - -{% swagger src="./../.gitbook/assets/umbraco_forms_swagger.json" path="/umbraco/forms/api/v1.0/definitions/{id}" method="get" %} -[umbraco_forms_swagger.json](./../.gitbook/assets/umbraco_forms_swagger.json) -{% endswagger %} - -{% swagger src="./../.gitbook/assets/umbraco_forms_swagger.json" path="/umbraco/forms/api/v1.0/entries/{id}" method="post" %} -[umbraco_forms_swagger.json](./../.gitbook/assets/umbraco_forms_swagger.json) -{% endswagger %} - -As well as this documentation, the definition of the API can also be reviewed via the Swagger UI, available at the following path: `/umbraco/forms/api/swagger/index.html`. - -The Open API specification is available from: `/umbraco/forms/api/openapi.json` - -### Requesting a Form Definition - -To request the definition of a form, the following request can be made: - -``` -GET /umbraco/forms/api/v1.0/definitions/{id}?contentId={contentId} -``` - -The GET request requires the Guid identifying the form. - -An optional `contentId` parameter can be provided, which can either be the integer or GUID identifier for the current page. If provided, the content item identified will be used for Forms features requiring information from the page the form is hosted on. This includes the parsing of ["magic string" placeholders](magic-strings.md). - -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. - -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. - -```json -{ - "disableDefaultStylesheet": false, - "fieldIndicationType": "MarkMandatoryFields", - "hideFieldValidation": false, - "id": "34ef4a19-efa7-40c1-b8b6-2fd7257f2ed3", - "indicator": "*", - "messageOnSubmit": "Thanks for submitting the form", - "name": "Simple Comment Form", - "nextLabel": "Next", - "pages": [ - { - "caption": "Your comment", - "fieldsets": [ - { - "caption": "", - "columns": [ - { - "caption": "", - "width": 12, - "fields": [ - { - "alias": "name", - "caption": "Name", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "[#message] from [#pageName]", - "id": "25185934-9a61-491c-9610-83dfe774662c", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for Name", - "placeholder": "", - "preValues": [], - "required": true, - "requiredErrorMessage": "Please provide a value for Name", - "settings": { - "defaultValue": "", - "placeholder": "Please enter your name.", - "showLabel": "", - "maximumLength": "", - "fieldType": "", - "autocompleteAttribute": "" - }, - "type": { - "id": "3f92e01b-29e2-4a30-bf33-9df5580ed52c", - "name": "Short answer" - } - }, - { - "alias": "email", - "caption": "Email", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "", - "id": "816fdf3b-a796-4677-a317-943a54bf9d55", - "pattern": "^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$", - "patternInvalidErrorMessage": "Please provide a valid value for Email", - "placeholder": "", - "preValues": [], - "required": true, - "requiredErrorMessage": "Please provide a value for Email", - "settings": { - "defaultValue": "", - "placeholder": "", - "showLabel": "", - "maximumLength": "", - "fieldType": "email", - "autocompleteAttribute": "" - }, - "type": { - "id": "3f92e01b-29e2-4a30-bf33-9df5580ed52c", - "name": "Short answer" - } - }, - { - "alias": "comment", - "caption": "Comment", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "", - "id": "9d723100-ec34-412f-aaa5-516634d7c833", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for Comment", - "placeholder": "", - "preValues": [], - "required": false, - "requiredErrorMessage": "Please provide a value for Comment", - "settings": { - "defaultValue": "", - "placeholder": "", - "showLabel": "", - "autocompleteAttribute": "", - "numberOfRows": "2", - "maximumLength": "" - }, - "type": { - "id": "023f09ac-1445-4bcb-b8fa-ab49f33bd046", - "name": "Long answer" - } - }, - { - "alias": "country", - "caption": "Country", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "", - "id": "30ff8f37-28d4-47df-f281-422b36c62e73", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for Country", - "placeholder": "", - "preValues": [ - { - "caption": "France", - "value": "fr" - }, - { - "caption": "Italy", - "value": "it" - }, - { - "caption": "Span", - "value": "es" - }, - { - "caption": "United Kingdom", - "value": "gb" - } - ], - "required": false, - "requiredErrorMessage": "Please provide a value for Country", - "settings": { - "defaultValue": "", - "allowMultipleSelections": "", - "showLabel": "", - "autocompleteAttribute": "", - "selectPrompt": "Please select" - }, - "type": { - "id": "0dd29d42-a6a5-11de-a2f2-222256d89593", - "name": "Dropdown" - } - }, - { - "alias": "favouriteColour", - "caption": "Favourite Colour", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "", - "id": "a6e2e27f-097d-476a-edb9-4aa79449ab5c", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for Favourite Colour", - "placeholder": "", - "preValues": [ - { - "caption": "Red", - "value": "red" - }, - { - "caption": "Green", - "value": "green" - }, - { - "caption": "Yellow", - "value": "yello" - } - ], - "required": false, - "requiredErrorMessage": "Please provide a value for Favourite Colour", - "settings": { - "defaultValue": "", - "showLabel": "" - }, - "type": { - "id": "fab43f20-a6bf-11de-a28f-9b5755d89593", - "name": "Multiple choice" - } - }, - { - "alias": "dataConsent", - "caption": "Data consent", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "Please indicate if it's OK to store your data.", - "id": "9f25acaf-4ac4-4105-9afe-eb0bb0c03b31", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for Data consent", - "placeholder": "", - "preValues": [], - "required": true, - "requiredErrorMessage": "Please confirm your data consent", - "settings": { - "acceptCopy": "Yes, I give permission to store and process my data.", - "showLabel": "" - }, - "type": { - "id": "a72c9df9-3847-47cf-afb8-b86773fd12cd", - "name": "Data Consent" - } - }, - { - "alias": "tickToAddMoreInfo", - "caption": "Tick to add more info", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [] - }, - "helpText": "", - "id": "6ce0cf78-5102-47c1-85c6-9530d9e9c6a6", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for Tick to add more info", - "placeholder": "", - "preValues": [], - "required": false, - "requiredErrorMessage": "Please provide a value for Tick to add more info", - "settings": { - "defaultValue": "" - }, - "type": { - "id": "d5c0c390-ae9a-11de-a69e-666455d89593", - "name": "Checkbox" - } - }, - { - "alias": "moreInfo", - "caption": "More info", - "condition": { - "actionType": "Show", - "logicType": "All", - "rules": [ - { - "field": "6ce0cf78-5102-47c1-85c6-9530d9e9c6a6", - "operator": "Is", - "value": "on" - } - ] - }, - "helpText": "", - "id": "5b4100ed-cc5e-4113-943c-ee5a8f4e448d", - "pattern": "", - "patternInvalidErrorMessage": "Please provide a valid value for More info", - "placeholder": "", - "preValues": [], - "required": false, - "requiredErrorMessage": "Please provide a value for More info", - "settings": { - "defaultValue": "", - "placeholder": "", - "showLabel": "", - "maximumLength": "", - "fieldType": "", - "autocompleteAttribute": "" - }, - "type": { - "id": "3f92e01b-29e2-4a30-bf33-9df5580ed52c", - "name": "Short answer" - } - } - ], - "width": 0 - } - ], - "id": "d677b96f-488d-4052-b00d-fb852b35e9c5" - } - ] - } - ], - "previousLabel": "Previous", - "showValidationSummary": false, - "submitLabel": "Submit" -} -``` - -### Submitting a Form Entry - -To submit a form entry, the following request can be made: - -``` -POST /umbraco/forms/api/v1.0/entries/{id} -``` - -The POST request requires the Guid identifying the form. - -It also requires a `Content-Type` header of `application/json` and accepts a body as per this example: - -```json -{ - "values": { - "name": "Fred", - "email": "fred@test.com", - "comment": "Test", - "country": "it", - "favouriteColours": ["red", "green"], - "dataConsent": "on" - }, - "contentId": "ca4249ed-2b23-4337-b522-63cabe5587d1", - "culture": "en-US" -} -``` - -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. - -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 -{ - "errors": { - "name": [ - "Please provide a value for Name" - ] - }, - "extensions": {}, - "status": 422, - "title": "One or more validation errors occurred." -} -``` - -A successful response will return a 202 "Accepted" status code. - -## Securing the API - -### Antiforgery Protection - -When posting forms in the traditional way, via a full page post back, an anti-forgery token is generated and validated. This provides protection against Cross-Site Request Forgery (CSRF) attacks. - -The same protection is available for forms submitted via AJAX techniques. - -In order to generate the token and provide it in the form post, the following code can be applied to the .cshtml template: - -```csharp -@using Microsoft.AspNetCore.Antiforgery - -@inject IAntiforgery antiforgery - -@{ - var tokenSet = antiforgery.GetAndStoreTokens(Context); -} -``` - -When posting the form, the header value generated can be provided, where it will be validated server-side before accepting the request. - -```javascript - let response = await fetch("/umbraco/forms/api/v1.0/entries/" + formId, { - method: "POST", - headers: { - "Content-Type": "application/json", - "@tokenSet.HeaderName" : "@tokenSet.RequestToken" - }, - body: JSON.stringify(data), - }); -``` - -### API Key - -The antiforgery token security approach is valid when building a client-side integration with API calls made from the browser. - -Providing the token isn't possible though in other headless situations such as server-to-server requests. In these situations, an alternative approach to securing the API is available. - -Firstly, with server-to-server integrations you will want to disable the antiforgery token protection. - -This is done by setting the `Umbraco:Forms:Security:EnableAntiForgeryTokenForFormsApi` configuration key to a value of `false`. - -You should then configure an API key `Umbraco:Forms:Security:FormsApiKey`. The string value can be anything, but it should not be susceptible to a brute force attack. - -With this in place any request to the Forms API will be rejected unless the configured value is provided in an HTTP header named `Api-Key`. - -## Rendering and Submitting forms with JavaScript - -For an illustrative example showing how a form can be rendered, validated and submitted using the API and vanilla JavaScript, please [see this gist](https://gist.github.com/AndyButland/9371175d6acf24a5307b053398f08448). - -Examples demonstrating how to handle a file upload and use reCAPTCHA fields are included. \ No newline at end of file diff --git a/10/umbraco-forms/developer/blocklistfilters.md b/10/umbraco-forms/developer/blocklistfilters.md deleted file mode 100644 index 72e85aaa95a..00000000000 --- a/10/umbraco-forms/developer/blocklistfilters.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -meta.Title: Block List Filters ---- - -# Block List Filters - -When working with the Block List editor, [the editor experience is enhanced](https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-list-editor#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}} -``` diff --git a/10/umbraco-forms/developer/configuration/README.md b/10/umbraco-forms/developer/configuration/README.md deleted file mode 100644 index 8842e95e5de..00000000000 --- a/10/umbraco-forms/developer/configuration/README.md +++ /dev/null @@ -1,499 +0,0 @@ ---- -meta.Title: Umbraco Forms configuration -description: >- - In Umbraco Forms it's possible to customize the functionality with various - configuration values. ---- - -# Configuration - -With Umbraco Forms it's possible to customize the functionality with various configuration values. - -## Editing configuration values - -All configuration for Umbraco Forms is held in the `appSettings.json` file found at the root of your Umbraco website. If the configuration has been customized to use another source, then the same keys and values discussed in this article can be applied there. - -The convention for Umbraco configuration is to have package based options stored as a child structure below the `Umbraco` element, and as a sibling of `CMS`. Forms configuration follows this pattern, i.e.: - -```json -{ - ... - "Umbraco": { - "CMS": { - ... - }, - "Forms": { - ... - } - } -} -``` - -All configuration for Forms is optional. In other words, all values have defaults that will be applied if no configuration is available for a particular key. - -For illustration purposes, the following structure represents the full set of options for configuration of Forms, along with the default values. This will help when you need to provide a different setting to understand where it should be applied. - -```json - "Forms": { - "FormDesign": { - "DisableAutomaticAdditionOfDataConsentField": false, - "DisableDefaultWorkflow": false, - "MaxNumberOfColumnsInFormGroup": 12, - "DefaultTheme": "default", - "DefaultEmailTemplate": "Forms/Emails/Example-Template.cshtml", - "Defaults": { - "ManualApproval": false, - "DisableStylesheet": false, - "MarkFieldsIndicator": "NoIndicator", - "Indicator": "*", - "RequiredErrorMessage": "Please provide a value for {0}", - "InvalidErrorMessage": "Please provide a valid value for {0}", - "ShowValidationSummary": false, - "HideFieldValidationLabels": false, - "NextPageButtonLabel": "Next", - "PreviousPageButtonLabel": "Previous", - "SubmitButtonLabel": "Submit", - "MessageOnSubmit": "Thank you", - "StoreRecordsLocally": true, - "AutocompleteAttribute": "", - "DaysToRetainSubmittedRecordsFor": 0, - "DaysToRetainApprovedRecordsFor": 0 - }, - "RemoveProvidedEmailTemplate": false, - "RemoveProvidedFormTemplates": false, - "FormElementHtmlIdPrefix": "", - "SettingsCustomization": { - "DataSourceTypes": {}, - "FieldTypes": {}, - "PrevalueSourceTypes": {}, - "WorkflowTypes": {}, - } - }, - "Options": { - "IgnoreWorkFlowsOnEdit": "True", - "ExecuteWorkflowAsync": "False", - "AllowEditableFormSubmissions": false, - "AppendQueryStringOnRedirectAfterFormSubmission": false, - "CultureToUseWhenParsingDatesForBackOffice": "", - "TriggerConditionsCheckOn": "change", - "ScheduledRecordDeletion": { - "Enabled": false, - "FirstRunTime": "", - "Period": "1.00:00:00" - }, - "DisableRecordIndexing": false, - "EnableFormsApi": false, - "EnableRecordingOfIpWithFormSubmission": true, - "UseSemanticFieldsetRendering": false, - "DisableRelationTracking": false, - "TrackRenderedFormsStorageMethod": "TempData" - }, - "Security": { - "DisallowedFileUploadExtensions": "config,exe,dll,asp,aspx", - "EnableAntiForgeryToken": true, - "SavePlainTextPasswords": false, - "DisableFileUploadAccessProtection": false, - "DefaultUserAccessToNewForms": "Grant", - "ManageSecurityWithUserGroups": false, - "GrantAccessToNewFormsForUserGroups": "admin,editor", - "FormsApiKey": "", - "EnableAntiForgeryTokenForFormsApi": true, - }, - "FieldTypes": { - "DatePicker": { - "DatePickerYearRange": 10 - }, - "Recaptcha2": { - "PublicKey": "", - "PrivateKey": "" - }, - "Recaptcha3": { - "SiteKey": "", - "PrivateKey": "", - "Domain": "Google" - }, - "RichText": { - "DataTypeId": "ca90c950-0aff-4e72-b976-a30b1ac57dad" - }, - "TitleAndDescription": { - "AllowUnsafeHtmlRendering": true - } - } - } -``` - -## Form design configuration - -### DisableAutomaticAdditionOfDataConsentField - -This configuration value expects a `true` or `false` value and can be used to disable the feature where all new forms are provided with a default "Consent for storing submitted data" field on creation. Defaults to `false`. - -### DisableDefaultWorkflow - -This configuration value expects a `true` or `false` value and can be used to toggle if new forms that are created adds an email workflow to send the result of the form to the current user who created the form. Defaults to `false`. - -### MaxNumberOfColumnsInFormGroup - -This setting controls the maximum number of columns that can be created by editors when they configure groups within a form. The default value used if the setting value is not provided is 12. - -### DefaultTheme - -This setting allows you to configure the name of the theme to use when an editor has not specifically selected one for a form. If empty or missing, the default value of "default" is used. If a custom default theme is configured, it will be used for rendering forms where the requested file exists, and where not, will fall back to the out of the box default theme. - -### DefaultEmailTemplate - -When creating an empty form, a single workflow is added that will send an email to the current user's address. By default, the template shipped with Umbraco Forms is available at `Forms/Emails/Example-Template.cshtml` is used. - -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`. - -### RemoveProvidedFormTemplates - -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. - -Once the form has been created, the values are set explicitly on the form, so subsequent changes to the defaults in configuration won't change the settings used on existing forms. - -#### ManualApproval - -This setting needs to be a `true` or `false` value and will allow you to toggle if a form allows submissions to be post moderated. Most use cases are for publicly shown entries such as blog post comments or submissions for a social campaign. Defaults to `false`. - -#### DisableStylesheet - -This setting needs to be a `true` or `false` value and will allow you to toggle if the form will include some default styling with the Umbraco Forms CSS stylesheet. Defaults to `false`. - -#### MarkFieldsIndicator - -This setting can have the following values to allow you to toggle the mode of marking mandatory or optional fields: - -* `NoIndicator` (default) -* `MarkMandatoryFields` -* `MarkOptionalFields` - -#### Indicator - -This setting is used to mark the mandatory or optional fields based on the setting above. By default this is an asterisk `*`. - -#### RequiredErrorMessage - -This allows you to configure the required error validation message. By default this is `Please provide a value for {0}` where the `{0}` is used to replace the name of the field that is required. - -#### InvalidErrorMessage - -This allows you to configure the invalid error validation message. By default this is `Please provide a valid value for {0}` where the `{0}` is used to replace the name of the field that is invalid. - -#### ShowValidationSummary - -This setting needs to be a `true` or `false` value and will allow you to toggle if the form will display all form validation error messages in a validation summary together. Defaults to `false`. - -#### HideFieldValidationLabels - -This setting needs to be a `true` or `false` value and will allow you to toggle if the form will show inline validation error messages next to the form field that is invalid. Defaults to `false`. - -#### NextPageButtonLabel, PreviousPageButtonLabel, SubmitButtonLabel - -These settings configure the default next, previous, and submit button labels. By default, these are `Next`, `Previous`, and `Submit` respectively. These labels can be amended on a form-by-form basis via the form's **Settings** section. - -#### MessageOnSubmit - -This allows you to configure what text is displayed when a form is submitted and is not being redirected to a different content node. Defaults to `Thank you`. - -#### StoreRecordsLocally - -This setting needs to be a `True` or `False` value and will allow you to toggle if form submission data should be stored in the Umbraco Forms database tables. By default this is set to `True`. - -#### AutocompleteAttribute - -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 - -This configuration expects a `True` or `False` string value, or a comma-separated list of form names, and allows you to toggle if a form submission is edited again, that the workflows on the form will re-fire after an update to the form submission. This is used in conjunction with the `AllowEditableFormSubmissions` configuration value. Defaults to `True`. - -### ExecuteWorkflowAsync - -This configuration key is _experimental_ and will allow Workflows to be executed in an asynchronous manner. The value can be a `True` or `False` string value, or a comma-separated list of form names. Defaults to `False`. - -### AllowEditableFormSubmissions - -This configuration value expects a `true` or `false` value and can be used to toggle the functionality to allow a form submission to be editable and re-submitted. When the value is set to `true` it allows Form Submissions to be edited using the following querystring for the page containing the form on the site. `?recordId=GUID` Replace `GUID` with the GUID of the form submission. Defaults to `false`. - -{% hint style="info" %} -There was a typo in this setting where it had been named as `AllowEditableFormSubmissions`. This is the name that needs to be used in configuration for Forms 9. In Forms 10 this was be corrected to the now documented value of `AllowEditableFormSubmissions`. -{% endhint %} - -{% hint style="warning" %} -Enable this feature ONLY if you understand the security implications. -{% endhint %} - -### AppendQueryStringOnRedirectAfterFormSubmission - -When redirecting following a form submission, a `TempData` value is set that is used to ensure the submission message is displayed rather than the form itself. In certain situations, such as hosting pages with forms in IFRAMEs from other websites, this value is not persisted between requests. - -By setting the following value to True, a querystring value of `formSubmitted=`, will be used to indicate a form submitted on the previous request. - -### CultureToUseWhenParsingDatesForBackOffice - -This setting has been added in 9.5 and 10.1, to help resolve an issue with multi-lingual setups. - -When Umbraco Forms stores data for a record, it saves the values submitted for each field into a dedicated table for each type (string, date etc.). It also saves a second copy of the record in a JSON structure which is more suitable for fast look-up and display in the backoffice. Date values are serialized using the culture used by the front-end website when the form entry is stored. - -When displaying the data in the backoffice, the date value needs to be parsed back into an actual date object for formatting. And this can cause a problem if the backoffice user is using a different language, and hence culture setting, than that used when the value was stored. - -From 9.5 and 10.1 onwards, the culture used when storing the form entry is recorded, thus we can ensure the correct value is used when parsing the date. However, this doesn't help for historically stored records. To at least partially mitigate the problem, when you have editors using different languages to a single language presented on the website front-end, you can set this value to match the culture code used on the website. This ensures the date fields in the backoffice are correctly presented. - -Taking an example of a website globalization culture code setting of "en-US" (and a date format of `m/d/y`), but an editor uses "en-GB" (which formats dates as of `d/m/y`). By setting the value of this configuration key to "en-US", you can ensure that the culture when parsing dates for presentation in the backoffice will match that used when the value was stored. - -If no value is set, and no culture value was stored alongside the form entry, the culture based on the language associated with the current backoffice user will be used. - -### TriggerConditionsCheckOn - -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. - -### DisableRecordIndexing - -Set this value to `true` to disable the default behavior of indexing the form submissions into the Examine index. - -If indexing has already occurred, you will still need to manually remove the files (found in `App_Data\TEMP\ExamineIndexes\UmbracoFormsRecords`). They will be recreated if indexing is subsequently re-enabled. - -### EnableFormsApi - -Set this value to `true` to enable the Forms API supporting headless and AJAX forms. - -### EnableRecordingOfIpWithFormSubmission - -The user's IP address is recorded by default when a form is submitted and stored in the `UFRecords` database table. - -To remove this behavior set this value to `false`. - -If recording IPs and your site is behind a proxy, load balancer or CDN, we recommend using [ASP.NET's forwarded headers middleware](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-7.0) to ensure the correct value for the client IP is resolved. - -### UseSemanticFieldsetRendering - -In Forms 10.5 amends were made to the default theme for Forms that improved accessibility. Specifically we provide the option to use alternative markup for rendering checkbox and radio button lists. These use the more semantically correct `fieldset` and `legend` elements, instead of the previously used `div` and `label`. - -Although this semantic markup is preferred, it could be a presentational breaking change for those styling the default theme. As such we have made this markup improvement optional. You can opt into using it by setting this configuration value to `true`. - -In Umbraco 13 this configuration option will be removed and the semantic rendering made the only option. - -### DisableRelationTracking - -Forms will by default track relations between forms and the content pages they are used on. This allows editors to see where forms are being used in their Umbraco website. - -If you would like to disable this feature, you can set the value of this setting to `false`. - -## TrackRenderedFormsStorageMethod - -Forms tracks the forms rendered on a page in order that the associated scripts can be placed in a different location within the HTML. Usually this is used to [render the scripts](../rendering-scripts.md)) at the bottom of the page. - -By default, `TempData` is used as the storage mechanism for this tracking. - -This can cause some issues when applying a Content Delivery Network (CDN) to your website, and as such an alternative is available using `HttpContext.Items`. - -To switch to this storage mechanism change the value of this setting from the default of `TempData` to `HttpContextItems`. - -We expect `HttpContextItems` to be the default option from Forms 14 onwards. - -## Security configuration - -### DisallowedFileUploadExtensions - -When using the File Upload field in a form, editors can choose which file extensions they want to accept. When an image is expected, they can for example specify that only `.jpg` or `.png` files are uploaded. - -There are certain file extensions that in almost all cases should never be allowed, which are held in this configuration value. This means that even if an editor has selected to allow all files, any files that match the extensions listed here will be blocked. - -By default, .NET related code files like `.config` and `.aspx` are included in this deny list. You can add or - if you are sure - remove values from this list to meet your needs. - -### EnableAntiForgeryToken - -This setting needs to be a `true` or `false` value and will enable the ASP.NET Anti Forgery Token and we recommend that you enable this option. Defaults to `true`. - -In certain circumstances, including hosting pages with forms in IFRAMEs from other websites, this may need to be set to `false`. - -### SavePlainTextPasswords - -This setting needs to be a `true` or `false` value and controls whether password fields provided in forms will be saved to the database. Defaults to `false`. - -### DisableFileUploadAccessProtection - -In Umbraco Forms 9.2.0, protection was added to uploaded files to prevent users from accessing them if they aren't logged into the backoffice and have permission to manage the form for which the file was submitted. As a policy of being "secure by default", the out of the box behavior is that this access protection is in place. - -If for any reason you need to revert to the previous behavior, or have other reasons where you want to permit unauthenticated users from accessing the files, you can turn off this protection by setting this configuration value to `true`. - -### DefaultUserAccessToNewForms - -In Umbraco Forms 9.3.0, this setting was added to add control over access to new forms. The default behavior is for all users to be granted access to newly created forms. To amend that to deny access, the setting can be updated to a value of `Deny`. A value of `Grant` or configuration with the setting absent preserves the default behavior. - -### ManageSecurityWithUserGroups - -Umbraco Forms 9.3.0 introduced the ability to administer access to Umbraco Forms using Umbraco's user groups. This can be used instead or in addition to the legacy administration which is at the level of the individual user. Set this option to `true` to enable the user group permission management functionality. - -### GrantAccessToNewFormsForUserGroups - -Also introduced in Umbraco Forms 9.3.0, this setting takes a comma-separated list of user group aliases which will be granted access automatically to newly created forms. This setting only takes effect when `ManageSecurityWithUserGroups` is set to `true`. - -There are two "special" values that can be applied within or instead of the comma-separated list. - -A value of `all` will give access to the form to all user groups. - -A value of `form-creator` will give access to all the user groups that the user who created the form is part of. - -### FormsApiKey and EnableAntiForgeryTokenForFormsApi - -Available from Forms 10.2.1, the `FormsApiKey` configuration setting can be used to secure the Forms Headless API in server-to-server integrations. When set, API calls will be rejected unless the value of this setting is provided in an HTTP header. - -Setting the value of `EnableAntiForgeryTokenForFormsApi` to `false` will disable the anti-forgery protection for the Forms Headless/AJAX API. You need to do this for server-to-server integrations where it's not possible to provide a valid anti-forgery token in the request. - -For more information, see the [Headless/AJAX Forms](../ajaxforms.md) article. - -## Field type specific configuration - -### Date picker field type configuration - -#### DatePickerYearRange - -This setting is used to configure the Date Picker form field range of years that is available in the date picker. By default this is a small range of 10 years. - -### reCAPTCHA v2 field type configuration - -#### PublicKey & PrivateKey - -Both of these configuration values are needed in order to use the "_Recaptcha2_" field type implementing legacy ReCaptcha V2 from Google. You can obtain both of these values after signing up to create a ReCaptcha key here - [https://www.google.com/recaptcha/admin](https://www.google.com/recaptcha/admin) - -Google has renamed these recently and the `Site Key` refers to `RecaptchaPublicKey` and `Secret Key` is to be used for `RecaptchaPrivateKey` - -### reCAPTCHA v3 field type configuration - -#### SiteKey & PrivateKey - -Both of these configuration values are needed in order to use the "_reCAPTCHA V3 with Score_" field type implementing ReCaptcha V3 from Google. - -You can obtain both of these values after signing up to create a ReCaptcha key here: [https://www.google.com/recaptcha/admin](https://www.google.com/recaptcha/admin). - -#### Domain - -This setting defines the domain from which the client-side assets for using the reCAPTCHA service are requested. - -Valid options are `Google` (the default) or `Recaptcha`. You may want to use the latter for control of which domains are setting cookies on your site. [Read more at the reCAPTCHA documentation](https://developers.google.com/recaptcha/docs/faq#does-recaptcha-use-cookies). - -### Rich text field type configuration - -#### DataTypeId - -Sets the Data Type Guid to use to obtain the configuration for the rich text field type. If the setting is absent, the value of the default rich text Data Type created by Umbraco on a new install is used. - -### Title and description field type configuration - -#### AllowUnsafeHtmlRendering - -When using the "title and description" field type, editors can provide HTML in the "description" field and have that rendered on the website. - -As a tightened security measure, you can set this value to `false` which will ensure HTML is no longer rendered. - -As some installations may be relying on HTML rendering, to preserve backward compatible behavior the default value of this setting is `true`. - -We expect to make the default value of this option `false` from Forms 14 onwards. \ No newline at end of file diff --git a/10/umbraco-forms/developer/configuration/type-details.md b/10/umbraco-forms/developer/configuration/type-details.md deleted file mode 100644 index f7739702b8f..00000000000 --- a/10/umbraco-forms/developer/configuration/type-details.md +++ /dev/null @@ -1,522 +0,0 @@ ---- -meta.Title: Forms Provider Type Details -description: Provides details of the built-in provider types available with Umbraco Forms ---- - -# Forms Provider Type Details - -This page provides some details of the provider types available in Umbraco Forms. - -The intention is to be able to make available details such as IDs, aliases and property names, that may be necessary when configuring the product. - -## Field Types - -
- -Checkbox - -**ID:** `D5C0C390-AE9A-11DE-A69E-666455D89593` - -**Alias:** `checkbox` - -**Settings:** - -* `DefaultValue` - -
- -
- -Data Consent - -**ID:** `A72C9DF9-3847-47CF-AFB8-B86773FD12CD` - -**Alias:** `dataConsent` - -**Settings:** - -* `AcceptCopy` -* `ShowLabel` - -
- -
- -Date - -**ID:** `F8B4C3B8-AF28-11DE-9DD8-EF5956D89593` - -**Alias:** `date` - -**Settings:** - -* `Placeholder` - -
- -
- -Dropdown List - -**ID:** `0DD29D42-A6A5-11DE-A2F2-222256D89593` - -**Alias:** `dropdown` - -**Settings:** - -* `DefaultValue` -* `AllowMultipleSelections` -* `ShowLabel` -* `AutocompleteAttribute` -* `SelectPrompt` - -
- -
- -File Upload - -**ID:** `84A17CF8-B711-46a6-9840-0E4A072AD000` - -**Alias:** `fileUpload` - -**Settings:** - -* `SelectedFilesListHeading` - -
- -
- -Long Answer - -**ID:** `023F09AC-1445-4bcb-B8FA-AB49F33BD046` - -**Alias:** `longAnswer` - -**Settings:** - -* `DefaultValue` -* `Placeholder` -* `ShowLabel` -* `AutocompleteAttribute` -* `NumberOfRows` -* `MaximumLength` - -
- -
- -Hidden Field - -**ID:** `DA206CAE-1C52-434E-B21A-4A7C198AF877` - -**Alias:** `hidden` - -**Settings:** - -* `DefaultValue` - -
- -
- -Multiple Choice - -**ID:** `FAB43F20-A6BF-11DE-A28F-9B5755D89593` - -**Alias:** `multipleChoice` - -**Settings:** - -* `DefaultValue` -* `ShowLabel` - -
- -
- -Password - -**ID:** `FB37BC60-D41E-11DE-AEAE-37C155D89593` - -**Alias:** `password` - -**Settings:** - -* `Placeholder` - -
- -
- -reCAPTCHA 2 - -**ID:** `B69DEAEB-ED75-4DC9-BFB8-D036BF9D3730` - -**Alias:** `recaptcha2` - -**Settings:** - -* `Theme` -* `Size` -* `ErrorMessage` - -
- -
- -reCAPTCHA 3 - -**ID:** `663AA19B-423D-4F38-A1D6-C840C926EF86` - -**Alias:** `recaptcha3` - -**Settings:** - -* `ScoreThreshold` -* `ErrorMessage` -* `SaveScore` - -
- -
- -Rich Text - -**ID:** `1F8D45F8-76E6-4550-A0F5-9637B8454619` - -**Alias:** `richText` - -**Settings:** - -* `Html` -* `ShowLabel` - -
- -
- -Single Choice - -**ID:** `903DF9B0-A78C-11DE-9FC1-DB7A56D89593` - -**Alias:** `singleChoice` - -**Settings:** - -* `DefaultValue` -* `ShowLabel` - -
- -
- -Short Answer - -**ID:** `3F92E01B-29E2-4a30-BF33-9DF5580ED52C` - -**Alias:** `shortAnswer` - -**Settings:** - -* `DefaultValue` -* `Placeholder` -* `ShowLabel` -* `MaximumLength` -* `FieldType` -* `AutocompleteAttribute` - -
- -
- -Title and Description - -**ID:** `e3fbf6c4-f46c-495e-aff8-4b3c227b4a98` - -**Alias:** `titleAndDescription` - -**Settings:** - -* `CaptionTag` -* `Caption` -* `BodyText` -* `ShowLabel` - -
- -## Workflow Types - -
- -Change Record State - -**ID:** `4C40A092-0CB5-481d-96A7-A02D8E7CDB2F` - -**Alias:** `changeRecordState` - -**Settings:** - -* `Words` -* `Action` - -
- -
- -Post as XML - -**ID:** `470EEB3A-CB15-4b08-9FC0-A2F091583332` - -**Alias:** `postAsXml` - -**Settings:** - -* `Url` -* `Method` -* `XsltFile` -* `Fields` -* `Username` -* `Password` - -
- -
- -Save As Umbraco Content Node - -**ID:** `89FB1E31-9F36-4e08-9D1B-AF1180D340DB` - -**Alias:** `saveAsUmbracoContentNode` - -**Settings:** - -* `Fields` -* `Publish` -* `RootNode` - -
- -
- -Save As XML File - -**ID:** `9CC5854D-61A2-48f6-9F4A-8F3BDFAFB521` - -**Alias:** `saveAsAnXmlFile` - -**Settings:** - -* `Path` -* `Extension` -* `XsltFile` - -
- -
- -Send Email - -**ID:** `E96BADD7-05BE-4978-B8D9-B3D733DE70A5` - -**Alias:** `sendEmail` - -**Settings:** - -* `Email` -* `CcEmail` -* `BccEmail` -* `SenderEmail` -* `ReplyToEmail` -* `Subject` -* `Message` -* `Attachment` - -
- -
- -Send Email With Razor Template - -**ID:** `17c61629-d984-4e86-b43b-a8407b3efea9` - -**Alias:** `sendEmailWithRazorTemplate` - -**Settings:** - -* `Email` -* `CcEmail` -* `BccEmail` -* `SenderEmail` -* `ReplyToEmail` -* `Subject` -* `RazorViewFilePath` -* `Attachment` - -
- -
- -Send Email With Extensible Stylesheet Language Transformations (XSLT) Template - -**ID:** `616edfeb-badf-414b-89dc-d8655eb85998` - -**Alias:** `sendEmailWithXsltTemplate` - -**Settings:** - -* `Email` -* `CcEmail` -* `BccEmail` -* `SenderEmail` -* `ReplyToEmail` -* `Subject` -* `XsltFile` - -
- -
- -Send Form To URL - -**ID:** `FD02C929-4E7D-4f90-B9FA-13D074A76688` - -**Alias:** `sendFormToUrl` - -**Settings:** - -* `Url` -* `Method` -* `StandardFields` -* `Fields` -* `Username` -* `Password` - -
- -
- -Slack - -**ID:** `bc52ab28-d3ff-42ee-af75-a5d49be83040` - -**Alias:** `slack` - -**Settings:** - -* `WebhookUrl` - -
- -
- -Slack (Legacy) - -**ID:** `ccbfb0d5-adaa-4729-8b4c-4bb439dc0202` - -**Alias:** `slackLegacy` - -**Settings:** - -* `Token` -* `Channel` -* `Username` -* `AvatarUrl` - -
- -## Prevalue Source Types - -
- -Datasource - -**ID:** `cc9f9b2a-a746-11de-9e17-681b56d89593` - -**Alias:** `dataSource` - -
- -
- -Get Values From Text File - -**ID:** `35C2053E-CBF7-4793-B27C-6E97B7671A2D` - -**Alias:** `getValuesFromTextFile` - -**Settings:** - -* `TextFile` - -
- -
- -SQL Database - -**ID:** `F1F5BD4D-E6AE-44ed-86CB-97661E4660B2` - -**Alias:** `sqlDatabase` - -**Settings:** - -* `Connection` -* `ConnectionString` -* `Table` -* `KeyColumn` -* `ValueColumn` -* `CaptionColumn` - -
- -
- -Umbraco Datatype Prevalues - -**ID:** `EA773CAF-FEF2-491B-B5B7-6A3552B1A0E2` - -**Alias:** `umbracoDataTypePreValues` - -**Settings:** - -* `DataTypeId` - -
- -
- -Umbraco Documents - -**ID:** `de996870-c45a-11de-8a39-0800200c9a66` - -**Alias:** `umbracoDocuments` - -**Settings:** - -* `RootNode` -* `UseCurrentPage` -* `DocType` -* `ValueField` -* `ListGrandChildren` -* `OrderBy` - -
- -## Data Source Types - -
- -SQL Database - -**ID:** `F19506F3-EFEA-4b13-A308-89348F69DF91` - -**Alias:** `sqlDatabase` - -**Settings:** - -* `Connection` -* `Table` - -
diff --git a/10/umbraco-forms/developer/contentapps.md b/10/umbraco-forms/developer/contentapps.md deleted file mode 100644 index f58bf30b3c3..00000000000 --- a/10/umbraco-forms/developer/contentapps.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -meta.Title: Content Apps ---- - -# Content Apps - -[Umbraco Content Apps](https://docs.umbraco.com/umbraco-cms/extending/content-apps) can be configured to appear alongside forms in the Umbraco Forms backoffice section. - -They will appear after the default "Design" and "Settings" apps when editing a form in the backoffice: - -![Umbraco Forms Content App]() - -A content app such as the following would display only in the forms section: - -```csharp - public class TestFormsContentApp : IContentAppFactory - { - public ContentApp GetContentAppFor(object source, IEnumerable userGroups) - { - // Only show app on forms - if (source is FormDesign) - { - return new ContentApp - { - Alias = "testFormsContentApp", - Name = "Test App", - Icon = "icon-calculator", - View = "/App_Plugins/TestFormsContentApp/testformscontentapp.html", - Weight = 0, - }; - } - - return null; - } - } -``` - -Within the `/App_Plugins/TestFormsContentApp/` folder we need the client-side files, for which an example is shown below: - -`package.manifest`: - -```json -{ - "contentApps": [ - { - "name": "Test Forms Content App", - "alias": "TestFormsContentApp", - "weight": 0, - "icon": "icon-calculator", - "view": "~/App_Plugins/TestFormsContentApp/testformscontentapp.html", - "show": [ - "+content/*", - "+media/*", - "+member/*", - "+forms/*" - ] - } - ], - "javascript": [ - "~/App_Plugins/TestFormsContentApp/testformscontentapp.controller.js" - ] -} -``` - -`testformscontentapp.html`: - -```html -
- - - -

Current form: {{vm.formName}}

-
-
-
-``` - -`testformscontentapp.controller.js`: - -```js -angular.module("umbraco") - .controller("My.TestFormsContentApp", function ($routeParams, formResource) { - var vm = this; - formResource.getWithWorkflowsByGuid($routeParams.id) - .then(function (response) { - vm.formName = response.data.name; - }); - }); -``` - -Finally, it needs to be registered via a composer: - -```csharp - public class TestSiteComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.ContentApps().Append(); - } - } -} -``` diff --git a/10/umbraco-forms/developer/custom-markup.md b/10/umbraco-forms/developer/custom-markup.md deleted file mode 100644 index 6f3b6a7339e..00000000000 --- a/10/umbraco-forms/developer/custom-markup.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -meta.Title: Umbraco Forms custom markup -description: >- - With Umbraco Forms it's possible to customize the outputted markup of a Form, - which means you have complete control over what Forms will output. ---- - -# Custom Markup - -With Umbraco Forms, it is possible to customize the output markup of a Form, which means you have complete control over what Forms will display. - -{% hint style="warning" %} -We recommend using [Themes](themes.md) to customize your Forms. This will ensure that nothing is overwritten when you upgrade Forms to a newer version. -{% endhint %} - -## Customizing the Default Views - -The razor macro uses some razor views to output the Form: - -* 1 view for each fieldtype -* 1 view for the scripts -* 1 view for the rest of the Form - -You can find the default views in the `~\Views\Partials\Forms\Themes\default` folder. - -To avoid your custom changes to the default views from being overwritten, you need to copy the view you want to customize into your theme folder, e.g. `~\Views\Partials\Forms\Themes\YourTheme`, and edit the file in `YourTheme` folder. - -### Form.cshtml - -This is the main view responsible for rendering the Form markup. - -The view is separated into two parts, one is the actual Form and the other will be shown if the Form is submitted. - -This view can be customized, if you do so it will be customized for all your Forms. - -### Script.cshtml - -This view renders the JavaScript that will take care of the conditional logic, customization won't be needed here. - -### FieldType.\*.cshtml - -The rest of the views start with FieldType, like `FieldType.Textfield.cshtml` and those will output the fields. There is a view for each default fieldtype like _textfield_, _textarea_, _checkbox_, etc) - -Contents of the `FieldType.Textfield.cshtml` view (from the default theme): - -```csharp -@model Umbraco.Forms.Mvc.Models.FieldViewModel -@using Umbraco.Forms.Mvc - -placeholder="@Model.PlaceholderText"}} - @{if(Model.Mandatory || Model.Validate){data-val="true"}} - @{if (Model.Mandatory) { data-val-required="@Model.RequiredErrorMessage"}} - @{if (Model.Validate) { data-val-regex="@Model.InvalidErrorMessage" data-val-regex-pattern="@Html.Raw(Model.Regex)"}} -/> -``` - -Umbraco Forms uses ASP.NET Unobtrusive Validation which is why you see attributes like `data-val` and `data-val-required`. - -This can be customized but it's important to keep the ID of the control to `@Model.Id` since that is used to match the value to the Form field. For fields that are conditionally hidden, without an ID of `@Model.Id` the control won't be shown when the conditions to show the field are met. An ID needs to be added to text controls such as headings and paragraphs. - -The view model for the partial view for a field is `FieldViewModel`. This defines properties that may be useful when creating new themes or custom fields, some of which are shown in the code samples above. Others include: - -* `AdditionalSettings` - a dictionary of the settings keys and values populated for the form field. These can be retrieved in typed form by key using e.g. `Model.GetSettingValue("MaximumLength", 255);`. - -The following are available on the model but only populated for fields that support file upload: - -* `AllowAllUploadExtensions`- a boolean indicating whether all file extensions are permitted for upload. -* `AllowedUploadExtensions`- a collection of strings indicating the file extensions that are permitted for upload. -* `AllowMultipleFileUploads`- a boolean indicating whether selecting multiple files for upload is allowed. - -### Customizing for a Specific Form - -It is also possible to customize the markup for a specific Form. - -You will need to create folder using the ID of the Form: `~\Views\Partials\Forms\{FormId}` (find the id of the Form in the URL when you are viewing the Form in the backoffice.) - -![Form GUID]() - -As an example if your Form ID is 0d3e6b2d-db8a-43e5-8f28-36241d712487 then you can overwrite the Form view by adding the `Form.cshtml` file to the directory. Start by copying the default one and then making your custom changes: `~\Views\Partials\Forms\0d3e6b2d-db8a-43e5-8f28-36241d712487\Form.cshtml`. - -You can also overwrite views for one or more fieldtypes by adding the views to the `Fieldtypes` folder: `~\Views\Partials\Forms\0d3e6b2d-db8a-43e5-8f28-36241d712487\Fieldtypes\Fieldtype.Textfield.cshtml`. diff --git a/10/umbraco-forms/developer/email-templates.md b/10/umbraco-forms/developer/email-templates.md deleted file mode 100644 index d3a894114cf..00000000000 --- a/10/umbraco-forms/developer/email-templates.md +++ /dev/null @@ -1,246 +0,0 @@ ---- -meta.Title: Umbraco Forms Email Templates -description: Creating an email template for Umbraco Forms. ---- - -# Email Templates - -We include a Workflow **Send email with template (Razor)** that allows you to pick a Razor view file that can be used to send out a _pretty HTML email_ for Form submissions. - -## Creating an Email Template - -If you wish to have one or more templates to choose from the **Send email with template (Razor)**, you will need to place all email templates into the `~/Views/Partials/Forms/Emails/` folder. - -The Razor view must inherit from FormsHtmlModel: - -```csharp -@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage -``` - -You now have a model that contains your Form fields which can be used in your email HTML markup, along with the UmbracoHelper methods such as `Umbraco.TypedContent` and `Umbraco.TypedMedia` etc. - -Below is an example of an email template from the `~/Views/Partials/Forms/Emails/` folder: - -```csharp -@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage - -@{ - //This is an example email template where you can use Razor Views to send HTML emails - - //You can use Umbraco.TypedContent & Umbraco.TypedMedia etc to use Images & content from your site - //directly in your email templates too - - //Strongly Typed - //@Model.GetValue("aliasFormField") - //@foreach (var color in Model.GetValues("checkboxField")){} - - //Dynamics - //@Model.DynamicFields.aliasFormField - //@foreach(var color in Model.DynamicFields.checkboxField - - //Images need to be absolute - so fetching domain to prefix with images - var siteDomain = Context.Request.Scheme + "://" + Context.Request.Host; - var assetUrl = siteDomain + "/App_plugins/UmbracoForms/Assets/Email-Example"; - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - Logo - -
- -
- - - - - -
-

Umbraco Forms

-
- -
- - - - - - - - - - - - - - - - - - - - - - -
- This is an example email template from Umbraco Forms Razor based email templates. You can build forms using any HTML markup you wish. -
- - CodeGarden16 Attendees - -
-

Form Results

-
- - @foreach (var field in Model.Fields) - { -

@field.Name

- - switch (field.FieldType) - { - case "FieldType.FileUpload.cshtml": -

@field.GetValue()

- break; - - case "FieldType.DatePicker.cshtml": - DateTime dt; - var fieldValue = field.GetValue(); - var dateValid = DateTime.TryParse(fieldValue != null ? fieldValue.ToString() : string.Empty, out dt); - var dateStr = dateValid ? dt.ToString("f") : ""; -

@dateStr

- break; - - case "FieldType.CheckBoxList.cshtml": -

- @foreach (var color in field.GetValues()) - { - @color
- } -

- break; - default: -

@field.GetValue()

- break; - } - } - -
- -
- - - - - - -
-

Need more help?

-

Find our documentation here

-
- -
- - -``` diff --git a/10/umbraco-forms/developer/extending/README.md b/10/umbraco-forms/developer/extending/README.md deleted file mode 100644 index 7ab60b54097..00000000000 --- a/10/umbraco-forms/developer/extending/README.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -meta.Title: "Extending Umbraco Forms" ---- - -# Extending - -Umbraco Forms functionality can be extended in different ways. In this section we focus on techniques available to a back-end/C# developer. - -For front-end extensions, specifically via theming, see the [Themes](../themes.md) section. - -## Developing Custom Providers - -The Forms package comes with many field, workflow, and other built-in types. If you have a requirement that isn't served by any of these, you can create and develop your own. - -### [Provider model](adding-a-type.md) - -Many features of Forms use a provider model, which makes it quicker to add new parts to the application. - -The model uses the notion that everything must have a type to exist. The type defines the capabilities of the item. For instance a Textfield on a form has a FieldType, this particular field type enables it to render an input field and save text strings. The same goes for workflows, which have a workflow type, datasources which have a datasource type and so on. Using the model you can seamlessly add new types and thereby extend the application. - -It is possible to add new Field types, Data Source Types, Prevalue Source Types, Export Types, and Workflow Types. - -### [Field types](adding-a-fieldtype.md) - -A field type handles rendering of the UI for a field in a form. It renders a standard ASP.NET Razor partial view and is able to return a list of values when the form is saved. - -The concept of provider settings, common to the field and other types, is also discussed in this section. - -### Data Source Types - -A data source type enables Umbraco Forms to connect to a custom source of data. A data source consists of any kind of storage if it is possible to return a list of fields Umbraco Forms can map values to. For example: a Database data source can return a list of columns Forms can send data to. This enables Umbraco Forms to map a form to a data source. A data source type is responsible for connecting Forms to external storage. - -### [Prevalue Source Types](adding-a-prevaluesourcetype.md) - -A prevalue source type connects to 3rd party storage to retrieve values. These values are used on fields supporting prevalues. The source fetches the collection of values. - -### [Workflow Types](adding-a-workflowtype.md) - -A workflow can be executed each time a form changes state (when it is submitted for instance). A workflow is responsible for executing logic which can modify the record or notify 3rd party systems. - -### [Export Types](adding-a-exporttype.md) - -Export types are responsible for turning form records into any other data format, which is then returned as a file. - -### [Magic String Format Functions](adding-a-magic-string-format-function.md) - -Custom magic string format functions to add to the [ones shipped with Umbraco Forms](../magic-strings.md#formatting-magic-strings) can be created in code. - -### [Validation Patterns](adding-a-validation-pattern.md) - -When creating a text field in Umbraco Forms, a validation pattern in the form of a regular expression can be applied. Default patterns can be removed or re-ordered, and custom ones created and added. - -## Handling Forms Events - -Another option for extension via custom code is to hook into one of the many events available. - -### [Validation](adding-an-event-handler.md) - -Form events are raised during the submission life cycle and can be handled for executing custom logic. - -### [Default Fields and Workflows](customize-default-workflows.md) - -When a new form is created, the default behavior is to add a single workflow. This workflow will send a copy of the form to the current backoffice user's email address. - -A single "data consent" field will also be added unless it has been disabled via configuration. - -It's possible to amend this behavior and change it to fit your needs. - -## Responding to State Values - -In the course of submitting a form, Umbraco Forms will set values in `TempData` and/or `HttpContext.Items`, that you can use to customize the website functionality. - -### Customizing Post-Submission Behavior - -Whether displaying a message or redirecting, a developer can customize the page viewed after the form is submitted based on the presence of `TempData` variables. - -One variable with a key of `UmbracoFormSubmitted` has a value containing the Guid identifier for the submitted form. - -A second variable contains the Guid identifier of the record created from the form submission. You can find this using the `Forms_Current_Record_id` key. - -In order to redirect to an external URL rather than a selected page on the Umbraco website, you will need to use a [custom workflow](../../developer/extending/adding-a-workflowtype.md). Within this workflow you can set the required redirect URL on the `HttpContext.Items` dictionary using the key `FormsRedirectAfterFormSubmitUrl` (defined in the constant `Umbraco.Forms.Core.Constants.ItemKeys.RedirectAfterFormSubmitUrl`). - -For example, using an injected instance of `IHttpContextAccessor`: - -```c# -_httpContextAccessor.HttpContext.Items[Constants.ItemKeys.RedirectAfterFormSubmitUrl] = "https://www.umbraco.com"; -``` diff --git a/10/umbraco-forms/developer/extending/adding-a-exporttype.md b/10/umbraco-forms/developer/extending/adding-a-exporttype.md deleted file mode 100644 index 4d2e63f20b8..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-exporttype.md +++ /dev/null @@ -1,223 +0,0 @@ ---- -meta.Title: "Adding an Export type to Umbraco Forms" ---- - -# Adding an Export type to Umbraco Forms - -*This builds on the "[adding a type to the provider model](adding-a-type.md)" chapter and applies to Umbraco Forms version 4.4.1 and higher* - -Add a new class to your project and have it inherit from `Umbraco.Forms.Core.ExportType` and you have two options when implementing the class. - -## Basic Example - -When implementing the method `public override string ExportRecords(RecordExportFilter filter)` in your export provider class. You need to return the final string you wish to write to a file. Such as .txt file or .csv and you can perform your logic to build up a comma separated string for a CSV file in the `ExportRecords` method. - -{% hint style="info" %} -In the constructor of your provider, you will need a further two properties, `FileExtension` and `Icon`. -{% endhint %} - -The FileExtension property is the file extension such as `zip`, `txt` or `csv` of the file you will be generating & serving from the file system as the export file. - -In this example below we will create a single HTML file which takes all the submissions/entries to be displayed as a HTML report. We will do this in conjunction with a Razor partial view to help build up our HTML and thus merge it with the form submission data to generate a string of HTML. - -### Provider Class - -```csharp -using System; -using Umbraco.Cms.Core.Hosting; -using Umbraco.Forms.Core; -using Umbraco.Forms.Core.Models; -using Umbraco.Forms.Core.Searchers; -using Umbraco.Forms.Web.Helpers; - -namespace MyFormsExtensions -{ - public class ExportToHtmlReport : ExportType - { - private readonly IFormRecordSearcher _formRecordSearcher; - - public ExportToHtmlReport( - IHostingEnvironment hostingEnvironment, - IFormRecordSearcher formRecordSearcher) - : base(hostingEnvironment) - { - _formRecordSearcher = formRecordSearcher; - - this.Name = "Export as HTML"; - this.Description = "Export entries as a single HTML report"; - this.Id = new Guid("4117D352-FB41-4A4C-96F5-F6EF35B384D2"); - this.FileExtension = "html"; - this.Icon = "icon-article"; } - - public override string ExportRecords(RecordExportFilter filter) - { - var view = "~/Views/Partials/Forms/Export/html-report.cshtml"; - EntrySearchResultCollection model = _formRecordSearcher.QueryDataBase(filter); - return ViewHelper.RenderPartialViewToString(view, model); - } - } -} -``` - -### Razor Partial View - -```csharp -@model Umbraco.Forms.Web.Models.Backoffice.EntrySearchResultCollection - -@{ - var submissions = Model.Results.ToList(); - var schemaItems = Model.schema.ToList(); -} - -

Form Submissions

- -@foreach (var submission in submissions) -{ - var values = submission.Fields.ToList(); - - for (int i = 0; i < schemaItems.Count; i++) - { - @schemaItems[i].Name @values[i]
- } - -
-} -``` - -## Advanced Example - -This approach gives us more flexibility in creating the file we wish to serve as the exported file. We do this for the export to Excel file export provider we ship in Umbraco Forms. With this we can use a library to create the Excel file and store it in a temporary location before we send back the filepath for the browser to stream down the export file. - -In this example we will create a collection of text files, one for each submission which is then zipped up into a single file and served as the export file. - -```csharp -using System; -using System.IO; -using System.IO.Compression; -using System.Linq; -using Umbraco.Cms.Core.Hosting; -using Umbraco.Forms.Core; -using Umbraco.Forms.Core.Models; -using Umbraco.Forms.Core.Searchers; - -namespace MyFormsExtensions -{ - public class ExportToTextFiles : ExportType - { - private readonly IFormRecordSearcher _formRecordSearcher; - - public ExportToTextFiles( - IHostingEnvironment hostingEnvironment, - IFormRecordSearcher formRecordSearcher) - : base(hostingEnvironment) - { - _formRecordSearcher = formRecordSearcher; - - this.Name = "Export as text files"; - this.Description = "Export entries as text files inside a zip file"; - this.Id = new Guid("171CABC9-2207-4575-83D5-2A77E824D5DB"); - this.FileExtension = "zip"; - this.Icon = "icon-zip"; - } - - /// - /// We do not implement this method from the interface - /// As this method is called from ExportToFile that we also override here & is expecting the file contents as a string to be written as a stream to a file - /// Which would be OK if we were creating a CSV or a single based file that can have a simple string written as a string such as one large HTML report or XML file perhaps - /// - public override string ExportRecords(RecordExportFilter filter) => throw new NotImplementedException(); - - /// - /// This gives us greater control of the export process - /// - /// - /// This filter contains the date range & other search parameters to limit the entries we are exporting - /// - /// - /// The filepath that the export file is expecting to be served from - /// So ensure that the zip of text files is saved at this location - /// - /// The final file path to serve up as the export - this is unlikely to change through the export logic - public override string ExportToFile(RecordExportFilter filter, string filepath) - { - // Before Save - Check Path, Directory & Previous File export does not exist - string pathToSaveZipFile = filepath; - - // Check our path does not contain \\ - // If not, use the filePath - if (filepath.Contains('\\') == false) - { - pathToSaveZipFile = HostingEnvironment.MapPathContentRoot(filepath); - } - - // Get the directory (strip out \\ if it exists) - var dir = filepath.Substring(0, filepath.LastIndexOf('\\')); - var tempFileDir = Path.Combine(dir, "text-files"); - - - // If the path does not end with our file extension, ensure it's added - if (pathToSaveZipFile.EndsWith("." + FileExtension) == false) - { - pathToSaveZipFile += "." + FileExtension; - } - - // Check that the directory where we will save the ZIP file temporarily exists - // If not just create it - if (Directory.Exists(tempFileDir) == false) - { - Directory.CreateDirectory(tempFileDir); - } - - // Check if the zip file exists already - if so delete it, as we have a new update - if (File.Exists(pathToSaveZipFile)) - { - File.Delete(pathToSaveZipFile); - } - - // Query the DB for submissions to export based on the filter - EntrySearchResultCollection submissions = _formRecordSearcher.QueryDataBase(filter); - - // Get the schema objects to a list so we can get items using position index - var schemaItems = submissions.schema.ToList(); - - // We will use this to store our contents of our file to save as a text file - var fileContents = string.Empty; - - // For each submission we have build up a string to save to a text file - foreach (EntrySearchResult submission in submissions.Results) - { - // The submitted data for the form submission - var submissionData = submission.Fields.ToList(); - - // For loop to match the schema position to the submission data - for (int i = 0; i < schemaItems.Count; i++) - { - // Concat a string of the name of the field & its stored data - fileContents += schemaItems[i].Name + ": " + submissionData[i] + Environment.NewLine; - } - - // Now save the contents to a text file - // Base it on the format of the record submission unique id - var textFileName = Path.Combine(tempFileDir, submission.UniqueId + ".txt"); - File.WriteAllText(textFileName, fileContents); - - // Reset fileContents to be empty again - fileContents = string.Empty; - } - - // Now we have a temp folder full of text files - // Generate a zip file containing them & save that - ZipFile.CreateFromDirectory(tempFileDir, pathToSaveZipFile); - - // Tidy up after ourselves & delete the temp folder of text files - if (Directory.Exists(tempFileDir)) - { - Directory.Delete(tempFileDir, true); - } - - // Return the path where we saved the zip file containing the text files - return pathToSaveZipFile; - } - } -} -``` diff --git a/10/umbraco-forms/developer/extending/adding-a-fieldtype.md b/10/umbraco-forms/developer/extending/adding-a-fieldtype.md deleted file mode 100644 index 41c78acf0ff..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-fieldtype.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -meta.Title: Adding a field type to Umbraco Forms ---- - -# Adding A Field Type To Umbraco Forms - -_This builds on the "_[_adding a type to the provider model_](adding-a-type.md)_" chapter_ - -## C\# - -Add a new class to the Visual Studio solution, make it inherit from `Umbraco.Forms.Core.FieldType` and fill in the constructor: - -```csharp -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNetCore.Http; -using Umbraco.Forms.Core.Enums; -using Umbraco.Forms.Core.Models; -using Umbraco.Forms.Core.Services; - -namespace MyFormsExtensions -{ - public class MyCustomField : Umbraco.Forms.Core.FieldType - { - public MyCustomField() - { - Id = new Guid("08b8057f-06c9-4ca5-8a42-fd1fc2a46eff"); // Replace this! - Name = "My Custom Field"; - Description = "Render a custom text field."; - Icon = "icon-autofill"; - DataType = FieldDataType.String; - SortOrder = 10; - SupportsRegex = true; - FieldTypeViewName = "FieldType.MyCustomField.cshtml"; - } - - // You can do custom validation in here which will occur when the form is submitted. - // Any strings returned will cause the submission to be considered invalid. - // Returning an empty collection of strings will indicate that it's valid to proceed. - public override IEnumerable ValidateField(Form form, Field field, IEnumerable postedValues, HttpContext context, IPlaceholderParsingService placeholderParsingService, IFieldTypeStorage fieldTypeStorage) - { - var returnStrings = new List(); - - if (!postedValues.Any(value => value.ToString().ToLower().Contains("custom"))) - { - returnStrings.Add("You need to include 'custom' in the field!"); - } - - // Also validate it against the default method (to handle mandatory fields and regular expressions) - return base.ValidateField(form, field, postedValues, context, placeholderParsingService, fieldTypeStorage, returnStrings); - } - } -} -``` - -In the constructor, we specify the standard provider information: - -- `Id` - should be set to a unique GUID. -- `Alias` - an internal alias for the field, used for localized translation keys. -- `Name` - the name of the field presented in the backoffice. -- `Description` - the description of the field presented in the backoffice. -- `Icon` - the icon of the field presented in the backoffice form builder user interface. -- `DataType` - specifies the type of data stored by the field. Options are `String`, `LongString`, `Integer`, `DataTime` or `Bit` (boolean). -- `SupportsRegex` - indicates whether pattern based validation using regular expressions can be used with the field. -- `FieldTypeViewName` - indicates the name of the partial view used to render the field. -- `RenderInputType`- indicates how the field should be rendered within the theme, as defined with the `RenderInputType` enum. The default is `Single` for a single input field. `Multiple` should be used for multiple input fields such as checkbox lists. `Custom` is used for fields without visible input fields. - -You will then need to register this new field as a dependency. - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Forms.Core.Providers; - -namespace MyFormsExtensions -{ - public class Startup : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.WithCollectionBuilder() - .Add(); - } - } -} -``` - -## Partial view - -Then we will start building the view for the default theme of the Form at `Views\Partials\Forms\Themes\default\FieldTypes\FieldType.MyCustomField.cshtml`. - -The file name for the partial view should match the value set on the `FieldTypeViewName` property. - -```csharp -@model Umbraco.Forms.Mvc.Models.FieldViewModel - placeholder="@Model.PlaceholderText" }} - @{if (Model.Mandatory || Model.Validate) { data-val="true" }} - @{if (Model.Mandatory) { data-val-required="@Model.RequiredErrorMessage" }} - @{if (Model.Validate) { data-val-regex="@Model.InvalidErrorMessage" data-val-regex-pattern="@Html.Raw(Model.Regex)" }} /> -``` - -This will be rendered when the default theme is used. - -If working with Umbraco 9 or earlier versions, you'll find the `Views\Partials\Forms\Themes\default\` folder on disk and can create the files in there. - -For Umbraco 10 and above, we've moved to [distributing the theme as part of a Razor Class Library](../../upgrading/version-specific.md#views-and-client-side-files) so the folder won't exist. However, you can create it for your custom field type. If you would like to reference the partial views of the default theme, you can download them as mentioned in the [Themes](../themes.md) article. - -## Umbraco backoffice view - -The final step involves building the HTML view which will be rendered in Umbraco as an example of how our end result will look: - -```html - -``` - -In the HTML you can access settings via `field.settings`, e.g. `{{field.settings.Caption}}` to render a "Caption" setting. It is also possible to access prevalues via `field.parsedPreValues`. - -For built-in field types, Umbraco Forms look for this file in the virtual folder: `App_Plugins\UmbracoForms\backoffice\Common\FieldTypes\`. It will expect to find a file with a name matching the class's name, i.e. `mycustomfield.html`. To add custom fields and themes, **create a folder at the specified path** (also known as the virtual folder). This is because the client-side code is included in the Razor Class Library. As a result, these files are available as if they're stored at a specific location on disk. - -To store in a different location, you can apply the following override to the custom field type's C# representation: - -```csharp -public override string GetDesignView() => - "~/App_Plugins/UmbracoFormsCustomFields/backoffice/Common/FieldTypes/mycustomfield.html"; -``` - -## Field settings - -Field settings that will be managed in the backoffice by editors creating forms using the custom field type can be added to the C# class. These settings can be added as properties with a `Setting` attribute: - -```csharp - [Setting("My Setting", Description = "Help text for the setting", View = "TextField", SupportsPlaceholders = "true", DisplayOrder = 10)] - public string MySetting { get; set; } -``` - -The property `Name` names the setting in the backoffice with the `Description` providing the help text. Both of these are translatable by providing a [user or package language file](../../../umbraco-cms/extending/language-files.md) containing appropriate keys: - -```xml - - My Setting - Help text for the setting - -``` - -The area aliases for the other provider types are as follows: - -- Data sources - `formProviderDataSources` -- Export types - `formProviderExportTypes` -- Prevalue sources - `formProviderPrevalueSources` -- Recordset actions - `formRecordSetActions` -- Workflows - `formProviderWorkflows` - -The `View` attribute defines the client-side view used when rendering a preview of the field in the form's designer. Umbraco Forms ships with a number of these, found in a virtual path of `App_Plugins\UmbracoForms\backoffice\Common\SettingTypes\`. - -Again though, you can use your own location, and configure with a full path to the view, e.g.: - -To reference the file the setting should be configured with a full path to the view, e.g.: - -```csharp - [Setting("My Setting", - Description = "Help text for the setting", - View = "~/App_Plugins/UmbracoFormsCustomFields/backoffice/Common/SettingTypes/mycustomsettingfield.html", - SupportsPlaceholders = true - DisplayOrder = 10)] - public string MySetting { get; set; } -``` - -`SupportsPlaceholders` is a flag indicating whether the setting can contain ["magic string" placeholders](../magic-strings.md) and controls whether they are parsed on rendering. - -`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). - -## Backoffice entry rendering - -The third and final client-side view file used for settings is in the rendering of the submitted values for the field. This rendering takes place in the "Entries" section of the backoffice. - -These are defined by the `RenderView` property of a field type and are found in `App_Plugins\UmbracoForms\backoffice\Common\RenderTypes\`. - -As for the other files, if you require a custom render type view, it's better to host them in different location, such as `App_Plugins\UmbracoFormsCustomFields\backoffice\Common\RenderTypes\mycustomrenderfield.html`. - -To reference the file you should override the `RenderView` property, e.g.: - -```csharp -public override string RenderView => "~/App_Plugins/UmbracoFormsCustomFields/backoffice/Common/RenderTypes/mycustomrenderfield.html"; -``` diff --git a/10/umbraco-forms/developer/extending/adding-a-magic-string-format-function.md b/10/umbraco-forms/developer/extending/adding-a-magic-string-format-function.md deleted file mode 100644 index b475aa38112..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-magic-string-format-function.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -meta.Title: "Add a Magic String Format Function" ---- - -# Adding a Magic String Format Function - -_This builds on the "_[_adding a type to the provider model_](adding-a-type.md)_" chapter_ - -Umbraco Forms [Magic Strings](../magic-strings.md) can be used to replace placeholders within form elements with values from different sources. Sources include the HTTP request or the Umbraco page where the form is hosted. - -These values can be formatted using [filter functions](../magic-strings.md#formatting-magic-strings). - -Filter functions for common operations such as truncating a string or formatting a date or number are provided. It's also possible to create custom ones in code. - -## Creating a custom format function - -To create a custom format function, create a class that implements `IParsedPlaceholderFormatter`. - -The `FunctionName` property provides the name of the function that will be used within the form's magic string. - -The `FormatValue` property parses the provided value and arguments and returns the formatted value as a string. - -The following example shows the implementation of a function that bounds an integer value. It takes two arguments, a minimum and maximum value. If the value read from the magic string source is numeric, and fits within the two bounds, it is returned. Otherwise, either the minimum or maximum value is returned depending on whether the value is lower or higher than the bounds respectively. - -```csharp -using System.Globalization; -using Umbraco.Forms.Core.Interfaces; - -namespace Umbraco.Forms.Core.Providers.ParsedPlacholderFormatters -{ - public class BoundNumber : IParsedPlaceholderFormatter - { - public string FunctionName => "bound"; - - public string FormatValue(string value, string[] args) - { - if (args.Length != 2) - { - return value; - } - - if (!int.TryParse(args[0], out var min) || !int.TryParse(args[1], out var max)) - { - return value; - } - - if (int.TryParse(value, out int valueAsInteger) || - int.TryParse(value, NumberStyles.None, CultureInfo.InvariantCulture, out valueAsInteger)) - { - if (valueAsInteger < min) - { - return min.ToString(); - } - - if (valueAsInteger > max) - { - return max.ToString(); - } - - return valueAsInteger.ToString(); - } - - return value; - } - } -} -``` - -## Registering the custom format function - -As with other provider types, the custom function needs to be registered. An example registration using the `IUmbracoBuilder` is shown below: - -```csharp -public static IUmbracoBuilder AddCustomProviders(this IUmbracoBuilder builder) -{ - builder.FormsParsedPlaceholderFormatters() - .Add(); - return builder; -} -``` - -## Using the custom format function - -The format function can be used within a form's magic string in the same way as the ones provided with Umbraco Forms. - -For the example provided, it would be used like this: - -```none -[#field | bound: 1: 10] -``` diff --git a/10/umbraco-forms/developer/extending/adding-a-prevaluesourcetype.md b/10/umbraco-forms/developer/extending/adding-a-prevaluesourcetype.md deleted file mode 100644 index 6122db19b6d..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-prevaluesourcetype.md +++ /dev/null @@ -1,219 +0,0 @@ -# Adding A Prevalue Source Type To Umbraco Forms - -_This builds on the "_[_Adding a type to the provider model_](adding-a-type.md)_" article_ - -Add a new class to your project - inherit it from `Umbraco.Forms.Core.FieldPreValueSourceType` and implement the class. - -The following example shows an illustrative custom prevalue source type that returns a hard-coded list of values. It can be extended for your needs via injection of services via the constructor. (See additional example at the bottom.) - -Dynamic settings can be applied and validated as shown in the [Validate type settings with ValidateSettings()](adding-a-type.md#validate-type-settings-with-validatesettings) article. - -```csharp -using System; -using System.Collections.Generic; -using Umbraco.Forms.Core; -using Umbraco.Forms.Core.Models; - -namespace MyFormsExtensions -{ - public class FixedListPrevalueSource : FieldPreValueSourceType - { - public FixedListPrevalueSource() - { - Id = new Guid("42C8158D-2AA8-4621-B653-6A63C7545768"); - Name = "Fixed List"; - Description = "Example prevalue source providing a fixed list of values."; - } - - public override List GetPreValues(Field field, Form form) => - new List - { - new PreValue - { - Id = 1, - Value = "item-one", - Caption = "Item One" - }, - new PreValue - { - Id = 2, - Value = "item-two", - Caption = "Item Two" - } - }; - - /// - public override List ValidateSettings() - { - // this is used to validate any dynamic settings you might apply to the PreValueSource - // if there are no dynamic settings, return an empty list of Exceptions: - var exceptions = new List(); - return exceptions; - } - } -} -``` - -You will then need to register this new prevalue source type as a dependency. - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Forms.Core.Providers; - -namespace MyFormsExtensions -{ - public class Startup : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.WithCollectionBuilder() - .Add(); - } - } -} -``` - -{% hint style="info" %} -The `PreValue` model in Umbraco Forms Versions 8.13.0, 9.5.0, 10.1.0, and above includes a `.Caption` property. This property is set separately from the `.Value` property. In the previous versions, the `Value` is generally used as the caption when rendered on the form. -{% endhint %} - -## Another Example Using Dependency Injection to Access Additional Services - -This example will take a user-provided Content Node and create a custom Prevalue list from the property data on that node. Your own `FieldPreValueSourceType` can get its data from wherever you like - an API call, custom functions, etc. - -```csharp -using System; -using System.Collections.Generic; -using Microsoft.Extensions.Logging; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.Web; -using Umbraco.Forms.Core; -using Umbraco.Forms.Core.Models; -namespace MyFormsExtensions - public class FormPrevaluesSourceNode : FieldPreValueSourceType - { - private readonly ILogger _logger; - private readonly IUmbracoContextFactory _UmbracoContextFactory; - //DEFINE ANY CONFIGURATION SETTING HERE - [Umbraco.Forms.Core.Attributes.Setting(name: "Source Node", - Alias = "SourceNodeId", - Description = "Node holding the Options desired.", - View = "pickers.content")] - public string SourceNodeId { get; set; } - public FormPrevaluesSourceNode( - ILogger logger - , IUmbracoContextFactory umbracoContextFactory - ) - { - _logger = logger; - _UmbracoContextFactory = umbracoContextFactory; - this.Id = new Guid("0E4D4E2B-56E1-4E86-84E4-9A0A6051B57C"); //MAKE THIS UNIQUE! - this.Name = "Content-defined Form Prevalues Source Node"; - this.Description = "Select a node of type 'FormPrevaluesSourceNode'"; - this.Group = "Custom"; - this.Icon = "icon-science"; - } - /// - /// The main method where the PreValues are defined and returned. - /// - /// - /// - /// List of 'Umbraco.Forms.Core.Models.PreValue' - public override List GetPreValues(Field field, Form form) - { - List result = new List(); - try - { - // Access the Configuration Setting and check that is is valid - if (!string.IsNullOrEmpty(SourceNodeId)) - { - var nodeId = 0; - var isValidId = Int32.TryParse(SourceNodeId, out nodeId); - if (isValidId) - { - IPublishedContent iPub; - using (var umbracoContextReference = _UmbracoContextFactory.EnsureUmbracoContext()) - { - iPub = umbracoContextReference.UmbracoContext.Content.GetById(nodeId); - } - if (iPub != null) - { - int sort = 0; - //This is using a ModelsBuilder Model to strongly-type the selected node - var preValSourceNode = new Models.FormPrevaluesSourceNode(iPub, null); - foreach (var prevalue in preValSourceNode.PreValues) - { - PreValue pv = new PreValue(); - pv.Id = $"{iPub.Id}-{sort}"; - pv.Value = prevalue.StoredValue; - pv.Caption = prevalue.DisplayText; //.Caption only available in Forms Versions 8.13.0+, 9.5.0+, & 10.1.0+ - pv.SortOrder = sort; - result.Add(pv); - sort++; - } - } - } - } - } - catch (Exception ex) - { - _logger.LogError($"Unable to get options from FormPrevaluesSourceNode #{SourceNodeId}", ex); - } - return result; - } - /// - /// This is where any checks for Configuration validity are done. - /// The exceptions will be displayed in the back-office UI to the user. - /// - /// List of 'System.Exception' - public override List ValidateSettings() - { - List exceptions = new List(); - if (string.IsNullOrEmpty(SourceNodeId)) - { - exceptions.Add(new Exception("'Source Node' setting not filled out")); - } - else - { - var nodeId = 0; - var isValidId = Int32.TryParse(SourceNodeId, out nodeId); - if (isValidId) - { - IPublishedContent iPub; - using (var umbracoContextReference = _UmbracoContextFactory.EnsureUmbracoContext()) - { - iPub = umbracoContextReference.UmbracoContext.Content.GetById(nodeId); - } - if (iPub != null && iPub.ContentType.Alias != Models.FormPrevaluesSourceNode.ModelTypeAlias) - { - exceptions.Add(new Exception("'Source Node' needs to be of type 'FormPrevaluesSourceNode'")); - } - } - } - return exceptions; - } - } -} -``` - -You will then need to register this new type as a dependency (either in 'Startup.cs' or in your own IComposer, as shown here). - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Forms.Core.Providers; -namespace MyFormsExtensions -{ - public class FormsComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - //Adding Custom Form PreValueSource - builder.WithCollectionBuilder() - .Add(); - } - } -} -``` diff --git a/10/umbraco-forms/developer/extending/adding-a-type.md b/10/umbraco-forms/developer/extending/adding-a-type.md deleted file mode 100644 index f6af786e0d8..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-type.md +++ /dev/null @@ -1,221 +0,0 @@ ---- -meta.Title: "Adding a type to the provider model" ---- - -# Adding a type to the provider model - -To add a new type, no matter if it's a workflow, field, data source, etc, there is a number of tasks to perform to connect to the Forms provider model. This chapter walks through each step and describes how each part works. This chapter will reference the creation of a workflow type. It is, however, the same process for all types. - -## Preparations - -Create a new class library project in Visual Studio add references to the `Umbraco.Forms.Core.dll` (available via referencing the [NuGet package](https://www.nuget.org/packages/Umbraco.Forms.Core/)). You might also need to reference [Umbraco.Forms.Core.Providers](https://www.nuget.org/packages/Umbraco.Forms.Core.Providers/). - -## Adding the type to Forms - -The Forms API contains a collection of classes that can be registered at startup or in an Umbraco component. So to add a new type to Forms you inherit from the right class. In the sample below we use the class for the workflow type. - -```csharp -public class LogWorkflow : Umbraco.Forms.Core.WorkflowType -{ - private readonly ILogger _logger; - - public LogWorkflow(ILogger logger) - { - _logger = logger; - } - - public override WorkflowExecutionStatus Execute(WorkflowExecutionContext context) - { - throw new NotImplementedException(); - } - - public override List ValidateSettings() { - throw new NotImplementedException(); - } -} -``` - -When you implement this class you get two methods added. One of them is Execute which performs the execution of the workflow and the other is a method which validates the workflow settings, we will get back to these settings later on. - -Any dependencies required that are registered with the dependency injection container can be provided via the constructor. - -Even though we have the class inheritance in place, we still need to add a bit of default information. - -## Setting up basic type information - -Even though we have the class inheritance in place, we still need to add a bit of default information. This information is added in the class's constructor like this: - -```csharp -public LogWorkflow(ILogger logger) { - - _logger = logger; - - this.Name = "The logging workflow"; - this.Id = new Guid("D6A2C406-CF89-11DE-B075-55B055D89593"); - this.Description = "This will save an entry to the log"; -} -``` - -All three are mandatory and the ID must be unique, otherwise the type might conflict with an existing one. - -## Adding settings to a type - -Now that we have a basic class setup, we would like to pass setting items to the type. So we can reuse the type on multiple items but with different settings. To add a setting to a type, we add a property to the class, and give it a specific attribute like this: - -```csharp -[Umbraco.Forms.Core.Attributes.Setting("Log Header", - Description = "Log item header", - View = "TextField")] -public string LogHeader { get; set; } -``` - -The Umbraco.Forms.Core.Attributes.Setting registers the property in Umbraco Forms and there will automatically be UI and storage generated for it. In the attribute, a name, description and the view to be rendered is defined. - -With the attribute in place, the property value is set every time the class is instantiated by Umbraco Forms. This means you can use the property in your code like this: - -```csharp -[Umbraco.Forms.Core.Attributes.Setting("Document ID", - Description = "Node the log entry belongs to", - View = "Pickers.Content")] -public string Document { get; set; } - -public override WorkflowExecutionStatus Execute(WorkflowExecutionContext context) { - _logger.LogInformation("Record submitted from: {IP}", context.Record.IP); - return WorkflowExecutionStatus.Completed; -} -``` - -For all types that use the provider model, settings work this way. By adding the Setting attribute Forms automatically registers the property in the UI and sets the value when the class is instantiated. - -## Validate type settings with ValidateSettings() - -The `ValidateSettings()` method which can be found on all types supporting dynamic settings, is used for making sure the data entered by the user is valid and works with the type. - -```csharp -public override List ValidateSettings() { - List exceptions = new List(); - int docId = 0; - if (!int.TryParse(Document, out docId)) - exceptions.Add(new Exception("Document is not a valid integer")); - return exceptions; -} -``` - -## Registering the class with Umbraco and Forms - -To register the type, ensure your web application project has a reference to the class library - either via a project or NuGet reference - and add the following code into the startup pipeline. In this example, the registration is implemented as an extension method to `IUmbracoBuilder` and should be called from `Startup.cs`: - -```csharp -public static IUmbracoBuilder AddUmbracoFormsCustomProviders(this IUmbracoBuilder builder) -{ - builder.WithCollectionBuilder() - .Add(); -} -``` - -An alternative approach is to use a composer, as per this example: - -```csharp -public class UmbracoFormsCustomProvidersComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - { - builder.WithCollectionBuilder() - .Add(); - } -} -``` - -From Umbraco Forms 9.5 and 10.0, there are further convenience methods you can use for registering custom types. These are found in the namespace `Umbraco.Forms.Core.Providers.Extensions`. - -For example, instead of the following: - -```csharp - builder.WithCollectionBuilder() - .Add(); -``` - -Your workflow can be registered using: - -```csharp - builder.AddFormsWorkflow(): -``` - -Or: - -```csharp - builder.FormsWorkflows().Add(); -``` - -Existing items that are not required in a particular installation can be removed with: - -```csharp - builder.FormsWorkflows().Exclude(); -``` - -Also look in the reference chapter for complete class implementations of workflows, fields and export types. - -## Overriding default providers in Umbraco Forms - -It is possible to override and inherit the original provider, be it a Field Type or Workflow etc. The only requirement when inheriting a fieldtype that you wish to override is to ensure you do not override/change the Id set for the provider, and make sure your class is public. - -Here is an example of overriding the Textarea field aka Long Answer. - -```csharp -public class TextareaWithCount : Umbraco.Forms.Core.Providers.FieldTypes.Textarea -{ - // Added a new setting when we add our field to the form - [Umbraco.Forms.Core.Attributes.Setting("Max length", - Description = "Max length", - View = "TextField")] - public string MaxNumberOfChars { get; set; } - - public TextareaWithCount() - { - // Set a different view for this fieldtype - this.FieldTypeViewName = "FieldType.TextareaWithCount.cshtml"; - - // We can change the default name of 'Long answer' to something that suits us - this.Name = "Long Answer with Limit"; - } - - public override IEnumerable ValidateField(Form form, Field field, IEnumerable postedValues, HttpContext context, IPlaceholderParsingService placeholderParsingService, List errors) - { - var baseValidation = base.ValidateField(form, field, postedValues, context, placeholderParsingService, errors); - var value = postedValues.FirstOrDefault(); - - if (value != null && value.ToString().Length < int.Parse(MaxNumberOfChars)) - { - return baseValidation; - } - - var custom = new List(); - custom.AddRange(baseValidation); - custom.Add("String is way way way too long!"); - - return custom; - } -} -``` - -As discussed in the previous section, you must also register the extended field type within a composer. You also need to create the the backoffice field type view. - -**Composer:** - -```csharp -public class UmbracoFormsCustomProvidersComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - { - builder.FormsFields().Add(); - } -} -``` - -**Backoffice View:** - -Add a new HTML file as per the name of the field class (e.g. `textareawithcount.html`) to `\wwwroot\App_Plugins\umbracoforms\Backoffice\Common\FieldTypes\` within your project. For this example, we can copy the original `textarea.html` file used by the standard 'Long Answer' field. - -The AngularJS client-side files are shipped with Umbraco Forms as part of a Razor Class Library. So you won't find these files on disk when you install the package. - -However if you do want to reference them you can view and extract them from the [`Umbraco.Forms.StaticAssets` NuGet package](https://nuget.info/packages/Umbraco.Forms.StaticAssets). diff --git a/10/umbraco-forms/developer/extending/adding-a-validation-pattern.md b/10/umbraco-forms/developer/extending/adding-a-validation-pattern.md deleted file mode 100644 index 1138e664389..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-validation-pattern.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -description: >- - Customize the regular expression based validation patterns available for text - fields. ---- - -# Adding a Validation Pattern - -When creating a text field in Umbraco Forms, a validation pattern in the form of a regular expression can be applied. Default patterns can be removed or re-ordered, and custom ones created and added. - -## Provided patterns - -Umbraco Forms ships with three patterns: number, email, and URL. The class names are `Number`, `Email`, and `Url` respectively, and all are found in the `Umbraco.Forms.Core.Providers.ValidationPatterns` namespace. - -## Creating a custom validation pattern - -To create a custom format function, create a class that implements `IValidationPattern`. You will need to initialize five properties: - -* `Alias` - an alias that should be unique across the patterns and is typically camel-cased with no spaces. -* `Name` - the name of the pattern that will be visible in the backoffice. -* `LabelKey` - as an alternative to providing a name, a translation key can be provided. This will be used to look-up the name in the correct language for the backoffice user. -* `Pattern` - the regular expression pattern. -* `ReadOnly` - a flag indicating whether the pattern can be edited in the backoffice. - -The following example shows the implementation of a pattern for a United Kingdom postcode (credit for the [pattern](https://stackoverflow.com/a/69806181/489433) to [Mecanik](https://stackoverflow.com/users/6583298/mecanik) at StackOverflow). - -```csharp -using Umbraco.Forms.Core.Interfaces; -namespace Umbraco.Forms.TestSite.Business.ValidationPatterns -{ - public class UkPostCode : IValidationPattern - { - public string Alias => "ukPostCode"; - public string Name => "UK Post Code"; - public string LabelKey => string.Empty; - public string Pattern => @"^([a-zA-Z]{1,2}[a-zA-Z\d]{1,2})\s(\d[a-zA-Z]{2})$"; - public bool ReadOnly => true; - } -} -``` - -## Registering the validation pattern - -As with other provider types, the validation pattern needs to be registered. There are options to add, remove, and re-order patterns. - -An example registration using the `IUmbracoBuilder` is shown below: - -```csharp -public static IUmbracoBuilder AddCustomProviders(this IUmbracoBuilder builder) -{ - builder.FormsValidationPatterns() - .Append(); - return builder; -} -``` - -## Using the pattern - -With the pattern registered it will be available for selection by editors in the backoffice when they create validation for fields supporting this feature. - -![Validation pattern](../../../../13/umbraco-forms/developer/images/validation-pattern.png) diff --git a/10/umbraco-forms/developer/extending/adding-a-workflowtype.md b/10/umbraco-forms/developer/extending/adding-a-workflowtype.md deleted file mode 100644 index 154c085719d..00000000000 --- a/10/umbraco-forms/developer/extending/adding-a-workflowtype.md +++ /dev/null @@ -1,119 +0,0 @@ -# Adding a workflow type to Umbraco Forms - -*This builds on the "[adding a type to the provider model](adding-a-type.md)" chapter* - -Add a new class to your project and have it inherit from `Umbraco.Forms.Core.WorkflowType`, implement the class. For this sample we will focus on the execute method. This method process the current record (the data submitted by the form) and have the ability to change data and state. - -```csharp -using Serilog; -using System; -using System.Collections.Generic; -using Umbraco.Forms.Core; -using Umbraco.Forms.Core.Data.Storage; -using Umbraco.Forms.Core.Enums; -using Umbraco.Forms.Core.Persistence.Dtos; -using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; - -namespace MyFormsExtensions -{ - public class TestWorkflow : WorkflowType - { - private readonly ILogger _logger; - - public TestWorkflow(ILogger logger) - { - _logger = logger; - - this.Id = new Guid("ccbeb0d5-adaa-4729-8b4c-4bb439dc0202"); - this.Name = "TestWorkflow"; - this.Description = "This workflow is just for testing"; - this.Icon = "icon-chat-active"; - this.Group = "Services"; - } - - public override WorkflowExecutionStatus Execute(WorkflowExecutionContext context) - { - // first we log it - _logger.LogDebug("the IP " + context.Record.IP + " has submitted a record"); - - // we can then iterate through the fields - foreach (RecordField rf in context.Record.RecordFields.Values) - { - // and we can then do something with the collection of values on each field - List vals = rf.Values; - - // or get it as a string - rf.ValuesAsString(false); - } - - //Change the state - context.Record.State = FormState.Approved; - - _logger.LogDebug("The record with unique id {RecordId} that was submitted via the Form {FormName} with id {FormId} has been changed to {RecordState} state", - context.Record.UniqueId, context.Form.Name, context.Form.Id, "approved"); - - return WorkflowExecutionStatus.Completed; - } - - public override List ValidateSettings() - { - return new List(); - } - } -} -``` - -## Information available to the workflow - -### Record information - -The `Execute()` method gets a `WorkflowExecutionContext` which has properties for the related `Form`, `Record`, and `FormState`. This parameter contains all information related to the workflow. - -The `Record` contains all data and metadata submitted by the form. As shown in the example above, you can iterate over all `RecordField` values in the form. You can also retrieve a specific record field by alias using the following method: - -```csharp -RecordField? recordField = context.Record.GetRecordFieldByAlias("myalias"); -``` - -Having obtained a reference to a record field, the submitted value can be retrieved via: - -```csharp -var fieldValue = recordField.ValuesAsString(false); -``` - -The `ValuesAsString` will JSON escape the result by default. If you do not want this escaping to occur, pass `false` as the parameter. - -If the field stores multiple values, they are delimited with a comma. In many cases, you can safely split on that delimiter to obtain the individual values. However, this can lead to issues if the prevalues being selected also contain commas. If that's a concern, the following extension method is available in `Umbraco.Forms.Core.Extensions` to correctly parse the selected prevalues: - -```csharp -IEnumerable selectedPrevalues = recordField.GetSelectedPrevalues(); -``` - -### Form and state information - -The `Form` references the form the record is from and `FormState` provides its state (submitted or approved). - -Other context, such as the current `HttpContext`, if needed can be passed as constructor parameters (for example: the `HttpContext` can be accessed by injecting `IHttpContextAccessor`). - -## Registering the workflow type - -To use the new workflow type, you will need to register it as part of application startup. - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Forms.Core.Providers; - -namespace MyFormsExtensions -{ - public class Startup : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.WithCollectionBuilder() - .Add(); - } - } -} -``` diff --git a/10/umbraco-forms/developer/extending/adding-an-event-handler.md b/10/umbraco-forms/developer/extending/adding-an-event-handler.md deleted file mode 100644 index 81cfd1b1fb2..00000000000 --- a/10/umbraco-forms/developer/extending/adding-an-event-handler.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -meta.Title: Adding Notification Handlers in Umbraco Forms -description: See an example of validating a form server-side ---- - -# Adding A Server-Side Notification Handler To Umbraco Forms - -## Form validation notification - -Add a new class to your project as a handler for the `FormValidateNotification` notification: - -```csharp -using System.Linq; -using Microsoft.AspNetCore.Http; -using Umbraco.Cms.Core.Events; -using Umbraco.Forms.Core.Models; -using Umbraco.Forms.Core.Services.Notifications; - -namespace MyFormsExtensions -{ - /// - /// Catch form submissions before being saved and perform custom validation. - /// - public class FormValidateNotificationHandler : INotificationHandler - { - public void Handle(FormValidateNotification notification) - { - // If needed, be selective about which form submissions you affect. - if (notification.Form.Name == "Form Name") - { - // Check the ModelState - if (notification.ModelState.IsValid == false) - { - return; - } - - // A sample validation - var email = GetPostFieldValue(notification.Form, notification.Context, "email"); - var emailConfirm = GetPostFieldValue(notification.Form, notification.Context, "verifyEmail"); - - // If the validation fails, return a ModelError - if (email.ToLower() != emailConfirm.ToLower()) - { - notification.ModelState.AddModelError(GetPostField(notification.Form, "verifyEmail").Id.ToString(), "Email does not match"); - } - } - } - - private static string GetPostFieldValue(Form form, HttpContext context, string key) - { - Field field = GetPostField(form, key); - if (field == null) - { - return string.Empty; - } - - - return context.Request.HasFormContentType && context.Request.Form.Keys.Contains(field.Id.ToString()) - ? context.Request.Form[field.Id.ToString()].ToString().Trim() - : string.Empty; - } - - private static Field GetPostField(Form form, string key) => form.AllFields.SingleOrDefault(f => f.Alias == key); - } -} -``` - -The handler will check the `ModelState` and `Form` field values provided in the notification. If validation fails, we add a `ModelError`. - -To register the handler, add the following code into the startup pipeline. In this example, the registration is implemented as an extension method to `IUmbracoBuilder` and should be called from `Startup.cs`: - -```csharp -public static IUmbracoBuilder AddUmbracoFormsCoreProviders(this IUmbracoBuilder builder) -{ - builder.AddNotificationHandler(); -} -``` - -## Service notifications - -The services available via interfaces `IFormService`, `IFolderService`, `IDataSourceService` and `IPrevalueSourceService` trigger following notifications before or after an entity handled by the service is modified. - -The "-ing" events allow for the entity being changed to be modified before the operation takes place, or to cancel the operation. The "-ed" events fire after the update is complete. - -Both can be wired up using a composer and component: - -```csharp - public class TestSiteComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.AddNotificationHandler(); - } - } - - public class FormSavingNotificationHandler : INotificationHandler - { - public void Handle(FormSavingNotification notification) - { - foreach (Form form in notification.SavedEntities) - { - foreach (Page page in form.Pages) - { - foreach (FieldSet fieldset in page.FieldSets) - { - foreach (FieldsetContainer fieldsetContainer in fieldset.Containers) - { - foreach (Field field in fieldsetContainer.Fields) - { - field.Caption += " (updated)"; - } - } - } - } - } - } - } -``` - -When a form or folder is _moved_ there is no specific service event. However, information available in the `State` dictionary on the notification object can be used to determine whether the item was moved. If so, it can show where it was moved from: - -```csharp - public class TestSiteComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.AddNotificationHandler(); - } - } - - public class FormSavingNotificationHandler : INotificationHandler - { - private readonly ILogger _logger; - - public FormSavingNotificationHandler(ILogger logger) => _logger = logger; - - public void Handle(FormSavingNotification notification) - { - foreach (Form savedEntity in notification.SavedEntities) - { - _logger.LogInformation($"Form updated. New parent: {savedEntity.FolderId}. Old parent: {notification.State["MovedFromFolderId"]}"); - } - } - } -``` - -If a folder is being moved, the key within the `State` dictionary is `"MovedFromParentId"`. - -## Backoffice entry rendering events - -When an entry for a form is rendered in the backoffice, an event is available to allow modification of the record detail. This event is available before the record details are presented to the user. This is shown in the following example: - -```csharp - public class TestSiteComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.AddNotificationHandler(); - } - } - - public class EntrySearchResultFetchingNotificationHandler : INotificationHandler - { - public void Handle(EntrySearchResultFetchingNotification notification) - { - var transformedFields = new List(); - foreach (var field in notification.EntrySearchResult.Fields) - { - if (field?.ToString() == "Test") - { - transformedFields.Add("Test (updated)"); - } - else - { - transformedFields.Add(field); - } - } - - notification.EntrySearchResult.Fields = transformedFields; - } - } -``` diff --git a/10/umbraco-forms/developer/extending/customize-default-workflows.md b/10/umbraco-forms/developer/extending/customize-default-workflows.md deleted file mode 100644 index cd420da3ca3..00000000000 --- a/10/umbraco-forms/developer/extending/customize-default-workflows.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -description: "How to amend the built-in behavior of adding fields and associating workflows with new forms" ---- - -# Customize Default Fields and Workflows For a Form - -By default, a single workflow is added when a new form is created. This workflow will send a copy of the form to the email address of the current backoffice user. - -A single "data consent" field will also be added unless it has been disabled via configuration. - -It's possible to amend this behavior and change it to fit your needs. - -## Implementing a Custom Behavior - -Two interfaces are used to abstract the logic for setting default fields and workflows for a form. They are `IApplyDefaultFieldsBehavior` and `IApplyDefaultWorkflowsBehavior` respectively. - -The default behaviors are defined using built-in, internal classes that implement this interface. - -You can create your own implementation of these interfaces. - -### Example - Providing a Custom Apply Workflows Behavior - -An illustrative example, adding a custom workflow that writes to the log, is shown below. - -Firstly, the custom workflow: - -```csharp -using System; -using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Core.Logging; -using Umbraco.Forms.Core.Attributes; -using Umbraco.Forms.Core.Enums; -using Umbraco.Forms.Core.Persistence.Dtos; - -namespace MyNamespace -{ - public class LogMessageWorkflow : WorkflowType - { - public const string LogMessageWorkflowId = "7ca500a7-cb34-4a82-8ae9-2acac777382d"; - private readonly ILogger _logger; - - public LogMessageWorkflow(ILogger logger) - { - Id = new Guid(LogMessageWorkflowId); - Name = "Test Workflow"; - Description = "A test workflow that writes a log line"; - Icon = "icon-edit"; - - _logger = logger; - } - - [Setting("Message", Description = "The log message to write", View = "TextField")] - public string Message { get; set; } - - public override List ValidateSettings() - { - var exs = new List(); - if (string.IsNullOrEmpty(Message)) - { - exs.Add(new Exception("'Message' setting has not been set")); - } - - return exs; - } - - public override WorkflowExecutionStatus Execute(WorkflowExecutionContext context) - { - _logger.LogInformation($"'{Message}' written at {DateTime.Now}"); - return WorkflowExecutionStatus.Completed; - } - } -} -``` - -Secondly, the custom implementation of `IApplyDefaultWorkflowsBehavior`: - -```csharp -using System; -using System.Collections.Generic; -using System.Linq; -using Umbraco.Cms.Core.Hosting; -using Umbraco.Forms.Core; -using Umbraco.Forms.Core.Enums; -using Umbraco.Forms.Core.Providers; -using Umbraco.Forms.Web.Behaviors; -using Umbraco.Forms.Web.Models.Backoffice; - -namespace MyNamespace -{ - public class CustomApplyDefaultWorkflowsBehavior : IApplyDefaultWorkflowsBehavior - { - private readonly WorkflowCollection _workflowCollection; - private readonly IHostingEnvironment _hostingEnvironment; - - public CustomApplyDefaultWorkflowsBehavior( - WorkflowCollection workflowCollection, IHostingEnvironment hostingEnvironment) - { - _workflowCollection = workflowCollection; - _hostingEnvironment = hostingEnvironment; - } - - public void ApplyDefaultWorkflows(FormDesign form) - { - // Retrieve the type of the default workflow to add. - WorkflowType testWorkflowType = _workflowCollection[new Guid(LogMessageWorkflow.LogMessageWorkflowId)]; - - // Create a workflow object based on the workflow type. - var defaultWorkflow = new FormWorkflowWithTypeSettings - { - Id = Guid.Empty, - Name = "Log a message", - Active = true, - IncludeSensitiveData = IncludeSensitiveData.False, - SortOrder = 1, - WorkflowTypeId = testWorkflowType.Id, - WorkflowTypeName = testWorkflowType.Name, - WorkflowTypeDescription = testWorkflowType.Description, - WorkflowTypeGroup = testWorkflowType.Group, - WorkflowTypeIcon = testWorkflowType.Icon, - - // Optionally set the default workflow to be mandatory (which means editors won't be able to remove it - // via the back-office user interface). - IsMandatory = true - }; - - // Retrieve the settings from the type. - Dictionary workflowTypeSettings = testWorkflowType.Settings(); - - // Create a collection for the specific settings to be applied to the workflow. - // Populate with the setting details from the type. - var workflowSettings = new List(); - foreach (KeyValuePair setting in workflowTypeSettings) - { - Core.Attributes.Setting settingItem = setting.Value; - - var settingItemToAdd = new SettingWithValue - { - Name = settingItem.Name, - Alias = settingItem.Alias, - Description = settingItem.Description, - Prevalues = settingItem.GetPreValues(), - View = _hostingEnvironment.ToAbsolute(settingItem.GetSettingView()), - Value = string.Empty - }; - - workflowSettings.Add(settingItemToAdd); - } - - // For each setting, provide a value for the workflow instance (in this example, we only have one). - SettingWithValue messageSetting = workflowSettings.SingleOrDefault(x => x.Alias == "Message"); - if (messageSetting != null) - { - messageSetting.Value = "A test log message"; - } - - // Apply the settings to the workflow. - defaultWorkflow.Settings = workflowSettings; - - // Associate the workflow with the appropriate form submission event. - form.FormWorkflows.OnSubmit.Add(defaultWorkflow); - } - } -} -``` - -Finally, to register the custom implementation in place of the default one: - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Extensions; -using Umbraco.Forms.Core.Providers; -using Umbraco.Forms.Testsite.Business.Workflows; -using Umbraco.Forms.Web.Behaviors; - -namespace MyNamespace -{ - public class TestSiteComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.WithCollectionBuilder() - .Add(); - - builder.Services.AddUnique(); - } - } -} -``` - -#### Setting a Mandatory Default Workflow - -When adding a default workflow in code, it's possible to make it mandatory, which will prevent editors from removing it from a form. - -You can see this in the example above, where the `IsMandatory` property of the created `FormWorkflowWithTypeSettings` instance is set to `true`. - -### Example - Providing a Custom Apply Fields Behavior - -The following class shows the default implementation provided with Forms. You can copy this and customize it to your needs. - -```csharp -using Microsoft.Extensions.Options; -using Umbraco.Forms.Core.Configuration; -using Umbraco.Forms.Core.Models; -using Umbraco.Forms.Web.Extensions; -using Umbraco.Forms.Web.Models.Backoffice; - -namespace Umbraco.Forms.Web.Behaviors -{ - internal class CustomApplyDefaultFieldsBehavior : IApplyDefaultFieldsBehavior - { - private readonly FormDesignSettings _formDesignSettings; - - public CustomApplyDefaultFieldsBehavior(IOptions formDesignSettings) => - _formDesignSettings = formDesignSettings.Value; - - public virtual void ApplyDefaultFields(FormDesign form) - { - // Add one page as a starting point. - var page = new Page(); - form.Pages.Add(page); - - // Add one empty fieldset to the page to start with. - var fieldset = new FieldSet - { - Id = Guid.NewGuid() - }; - page.FieldSets.Add(fieldset); - - // Add one full-width (12cols) container/row to the fieldset. - var container = new FieldsetContainer - { - Width = 12 - }; - fieldset.Containers.Add(container); - - // As all forms default to having StoreRecordsLocally we need to add the data consent field to the the form - // (unless this feature has been explicitly disabled). - if (_formDesignSettings.DisableAutomaticAdditionOfDataConsentField) - { - return; - } - - container.AddDataConsentField(_formDesignSettings, _fieldCollection); - - // Add any further fields you require. - } - } -} -``` - -Again, you will need to register your custom class, for example, in a composer with: - -```csharp -builder.Services.AddUnique(); -``` diff --git a/10/umbraco-forms/developer/extending/excluding-a-built-in-field.md b/10/umbraco-forms/developer/extending/excluding-a-built-in-field.md deleted file mode 100644 index 9714474a3e0..00000000000 --- a/10/umbraco-forms/developer/extending/excluding-a-built-in-field.md +++ /dev/null @@ -1,28 +0,0 @@ -# Excluding a Built-in Field - -Umbraco Forms comes with some built-in fields however it is possible to exclude/remove them if necessary. -There might some use cases where you have no use for file upload and don't want editors using them. Or perhaps you want to remove a field to replace it with one with enhanced functionality that you build yourself. - -## Example - -The following class shows how to exclude built-in field types using a custom composer. The `Password`, `Recaptcha2` and `RichText` field types (or "answers") will no longer be available for selection when creating a form in the backoffice. - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Forms.Core.Providers.Extensions; -using Umbraco.Forms.Core.Providers.FieldTypes; - -namespace MyNamespace -{ - public class MyFormFieldsComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - builder.FormsFields() - .Exclude() - .Exclude() - .Exclude(); - } - } -} -``` diff --git a/10/umbraco-forms/developer/field-types.md b/10/umbraco-forms/developer/field-types.md deleted file mode 100644 index b2f83ebae07..00000000000 --- a/10/umbraco-forms/developer/field-types.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -meta.Title: Umbraco Forms Field Types ---- - -# Field Types - -Umbraco Forms comes with a number of Field Types to allow you to request certain data in the forms that you design & build. This documentation is to guide specific details about field types that we ship that require some detail in how they work. - -## Date Picker - -The date picker uses a front-end library called [PikaDay.js](https://github.com/dbushell/Pikaday) to display a UI to pick dates from. We have added the support for the Pikaday date picker to be localized based on the page the form is rendered on. This displays the picked date in the correct locale. In JavaScript, we update a hidden field with a standard date format. This is done to send the date to the server, ensuring the record submission is stored in a standard format. This is to avoid locale mixing up dates. - -To achieve this a new Razor partial view is included `/Views/Partials/Forms/DatePicker.cshtml`. Once on a page with a form that includes a Date Picker, it also includes the MomentJS library to assist with date locale formatting. Additionally, there are appropriate changes to Pikaday.js to support the locales. If you wish to use a different DatePicker component this is the file that you would customize to your needs. - -### Date Picker configuration of the year range - -The `DatePicker` has one configuration setting to control the number of year shown. The default is 10 years which makes the picker unusable for picking birth dates. - -Go to your `appsettings.json` and add: -```json - "Umbraco": { - "CMS": { - ... - }, - "Forms": { - "FieldTypes": { - "DatePicker": { - "DatePickerYearRange": 12 - } - } - } - } -``` - -You can then change the `DatePickerYearRange` to a higher number (for example 100). \ No newline at end of file diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.0.0-rc1.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.0.0-rc1.zip deleted file mode 100644 index 617c2acbb11..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.0.0-rc1.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.1.0.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.1.0.zip deleted file mode 100644 index d87d7703d8d..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.1.0.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.2.0.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.2.0.zip deleted file mode 100644 index 1ef86ec9757..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.2.0.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.2.4.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.2.4.zip deleted file mode 100644 index 61ef9291db0..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.2.4.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.3.0.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.3.0.zip deleted file mode 100644 index b2bd3513792..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.3.0.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.0-c1.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.0-c1.zip deleted file mode 100644 index 3a16ecc7e17..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.0-c1.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.1.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.1.zip deleted file mode 100644 index 139efe00f35..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.1.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.2.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.2.zip deleted file mode 100644 index 9700e1533c8..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.2.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.3.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.3.zip deleted file mode 100644 index 4173668c58d..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.3.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.5.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.5.zip deleted file mode 100644 index 34bab42c928..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.5.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.6.zip b/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.6.zip deleted file mode 100644 index 34bab42c928..00000000000 Binary files a/10/umbraco-forms/developer/files/umbraco-forms-default-theme-10.5.6.zip and /dev/null differ diff --git a/10/umbraco-forms/developer/forms-in-the-database.md b/10/umbraco-forms/developer/forms-in-the-database.md deleted file mode 100644 index e49ef383ec9..00000000000 --- a/10/umbraco-forms/developer/forms-in-the-database.md +++ /dev/null @@ -1,53 +0,0 @@ -# Umbraco Forms in the Database - -In Umbraco Forms, it is _only_ possible to store Form data in the database. - -If you are upgrading to Umbraco 9 or later and using Forms, you should first migrate the Forms to the database using Forms 8. As of Umbraco Forms version 8.5.0 it is possible to persist all Forms data in the Umbraco database. This includes definitions for each Form and their fields, as well as workflow definitions and prevalues. - -{% hint style="info" %} -**Custom file system providers** - -If [custom file system providers are used on your project for storing Umbraco Forms data](https://docs.umbraco.com/umbraco-cms/extending/filesystemproviders#custom-providers), the migration will not be able to run. - -To persist your Umbraco Forms data in the database, you will need to revert to a **standard Umbraco Forms configuration**. Use the default provider to store the Forms definition files in the default location. - -You need to ensure that your Forms definition files are moved from their previous location. This is a non-default file path, blob storage, or similar to the default location, `App_Data/UmbracoForms`, that Forms will now be using. - -Your configuration is now considered a standard configuration and you can perform the steps required for a normal migration. -{% endhint %} - -## Enable storing Forms definitions in the database - -To persist Umbraco Forms definitions in the database, follow these steps: - -1. Upgrade to at least Umbraco Forms version 8.5.2. -2. Open the configuration file `App_Plugins\UmbracoForms\UmbracoForms.config`. -3. Locate the `StoreUmbracoFormsInDb` key in the `` section, and make sure it has the following value: - - ```xml - - ``` - -4. Save the file. - -If you are working with a Umbraco Cloud project, make sure you follow the migration steps outlined in the [Umbraco Forms on Cloud](https://docs.umbraco.com/umbraco-cloud/deployments/umbraco-forms-on-cloud) article. - -{% hint style="warning" %} -Enabling the persisting of Umbraco Forms in the database is irreversible. Once you've made the change, reverting to the file approach will not be an option. -{% endhint %} - -When you save the file, the site will restart and run a migration step, migrating the files to the Umbraco database. - -## Migrating Forms in files into a site - -You can force Forms to rerun the migration of the file-format Forms if you have a Umbraco 8 site storing Forms in the database. - -First of all, you should ensure that you have enabled the setting that persists Forms in the database, as the migration requires this (`StoreUmbracoFormsInDb`) key. We highly recommend testing this on a local setup before applying it to your live site. - -1. Copy over the Forms, workflows, prevaluesources, and datasource files to the site into `~\App_Data\UmbracoForms\Data`. -2. Go to the database and find the `[umbracoKeyValue]` table. -3. Find the Form's row and check that the value is `1d084819-84ba-4ac7-b152-2c3d167d22bc` (if not you are not currently working with Forms in the database, changing the setting should be enough). -4. Change that value to `{forms-init-complete}`. -5. Restart the site. - -The site will now try to migrate the Forms files into the database. In the umbracoTraceLog, you can follow the progress. It will throw errors if anything goes wrong. Additionally, it will log out "The Umbraco Forms DB table {TableName} already exists" for the 4 Forms tables before starting the migration. diff --git a/10/umbraco-forms/developer/healthchecks/README.md b/10/umbraco-forms/developer/healthchecks/README.md deleted file mode 100644 index b2acaba8172..00000000000 --- a/10/umbraco-forms/developer/healthchecks/README.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -meta.Title: Healthchecks ---- - -# Health Checks - -In this article, you will find information about Umbraco Forms-related health checks that can be run from the Umbraco backoffice to ensure that your installation is running seamlessly. - -Read the [Health Check](https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/extending/health-check) article to learn more about the feature in general. - -## Database Integrity Health Check - -Running this health check will verify whether the database tables for the Umbraco Forms installation are all set up correctly with the proper data integrity checks. - -In this section, you can learn more about the background for adding this check, as well as how to use and understand the results. - -### Background - -With version 8.7, a health check was introduced to confirm the Umbraco Forms database tables are all set up with the expected data integrity checks - i.e. primary keys, foreign keys and unique constraints. - -In most cases, you can expect them all to be in place without any developer intervention. For new installs, the database schema is initialized with all the necessary integrity constraints. And for upgrades, any new schema changes are automatically applied. - -There remains the possibility though that not all will be in place for a particular installation. For example, this could happen if a constraint is added in a new version. It can't be added via an automated migration due to existing data integrity issues. - -In particular, prior to version 8.7, there were a number of tables that weren't defined as strictly as they should be in this area. So we've added some primary key, foreign key and unique constraints with this version. If you've been running a version prior to this and are upgrading, these schema updates will be applied automatically _unless_ there is existing data in the tables that prevent them from being added. - -There shouldn't be - but without these constraints in place it's always possible for an application bug to exist that allows for example the creation of duplicate records, or the orphaning of records, that aren't correct. This is the reason for the constraints to exist, and why we want to ensure they are in place. - -### Running The Health Check - -To run the health check: - -1. Navigate to the **Health Check** dashboard in the **Settings** section in the Umbraco backoffice. ![Umbraco Forms Health Check]() -2. Click on the **Forms** button and select **Check Group**. You'll see a result that looks something like this: ![Umbraco Forms Health Check]() - -If you have a full set of green ticks, then you're all good - and no need to read on! - -If you have one or more red crosses though, that means a particular constraint wasn't able to be applied via the automatic schema migrations when you installed a new version of Umbraco Forms, due to existing data issues. - -It isn't essential that they are resolved - the package can and does function correctly without them - but for reasons of ensuring data integrity and performance, it is recommended that they are. - -### Resolving Reported Problems - -When Umbraco Forms installs an upgrade, it will attempt to apply any schema changes. If though, the update isn't essential, and it can't proceed due to existing data integrity issues, the failed update will be logged and then the rest of the migration will continue. - -As well as in the log files, such issues will be visible via the health check and will need to be resolved by applying scripts directly to the database. - -To support this, we provide the following SQL scripts: - -* Apply database integrity schema changes for 8.7.0+ - [8.7.0-apply-keys-and-indexes](apply-keys.md) -* Apply database integrity schema changes for 8.7.0+ (Forms in database tables) - [8.7.0-apply-keys-and-indexes-forms-in-db](forms-in-the-database-apply-keys.md) - -The first of these provides the SQL statements required to apply the schema updates for 8.7.0+ to the common Umbraco Forms tables. The second applies to those tables used for when Forms are stored in the database, and hence only need to be applied if that option is configured. - -{% hint style="info" %} -Before running any scripts or queries, please be sure to have a database backup in place. -{% endhint %} - -To take an example, let's say that via the health check results you can see that the _"Unique constraint on table 'UFForms', column 'Key' is missing."_ - -If you look in the SQL script you'll see that in order to apply this directly to the database, you would need to run the following SQL statement: - -```sql --- Adds unique constraint to UFForms. -ALTER TABLE dbo.UFForms -ADD CONSTRAINT UK_UFForms_Key UNIQUE NONCLUSTERED -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -``` - -If you run it though, you'll see the reason why the migration that ran when Umbraco Forms was upgraded couldn't apply the change: - -```sql -The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.UFForms' and the index name 'UK_UFForms_Key'. The duplicate key value is (...). -``` - -The constraint can't be applied if there are existing duplicate values, so first they need to be found and removed. - -To find duplicate values in the 'Key' field in this table you can run the following SQL statement: - -```sql -SELECT [Key] -FROM UFForms -GROUP BY [Key] -HAVING COUNT(*) > 1 -``` - -Running the statement above will list out the 'Key' fields that are duplicated in the table. - -To see the full details of the duplicate records, you can use this query: - -```sql -SELECT * -FROM UFForms -WHERE [Key] IN (SELECT [Key] - FROM UFForms - GROUP BY [Key] - HAVING COUNT(*) > 1 -) -``` - -From the `Id` field you can identify the Form records that are duplicated and should be removed, and delete the records. To check you have found them all, run one of the above queries again, and confirm you find no records returned. - -Finally you can run the `ALTER TABLE...` statement shown above to apply the constraint, and confirm via the health check that it's now in place. - -By repeating similar steps as required, you'll be able to ensure that all recommended keys, constraints and indexes are in place. - -If for any reason you wish to revert the changes - perhaps when testing these updates in a non-production environment - reversion scripts for all the 8.7 updates are also provided: - -To support this, we provide the following SQL scripts: - -* Revert database integrity schema changes for 8.7.0+ - [8.7.0-apply-keys-and-indexes\_revert](apply-keys.md#revert-application-of-keys-and-indexes) -* Revert database integrity schema changes for 8.7.0+ (Forms in database tables) - [8.7.0-apply-keys-and-indexes-forms-in-db\_revert](forms-in-the-database-apply-keys.md#reverting-the-application-of-keys-and-indexes) diff --git a/10/umbraco-forms/developer/healthchecks/apply-keys.md b/10/umbraco-forms/developer/healthchecks/apply-keys.md deleted file mode 100644 index d41bc91b114..00000000000 --- a/10/umbraco-forms/developer/healthchecks/apply-keys.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -meta.Title: "Apply keys and indexes" ---- - -# Apply keys and indexes - -```sql -/* - Applies recommended primary keys, foreign keys and indexes to core Umbraco Forms tables. - This replicates for SQL Server the migration AddRecordKeysAndIndexes. - */ - --- Adds relationship between UFRecords and UFRecordFields. -ALTER TABLE dbo.UFRecordFields -ADD CONSTRAINT - FK_UFRecordFields_UFRecords_Record FOREIGN KEY - ( - Record - ) REFERENCES dbo.UFRecords - ( - Id - ) ON UPDATE NO ACTION - ON DELETE NO ACTION -GO - --- Adds primary keys to UFRecordData* tables. -ALTER TABLE dbo.UFRecordDataBit -ADD CONSTRAINT - PK_UFRecordDataBit PRIMARY KEY CLUSTERED - ( - Id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -ALTER TABLE dbo.UFRecordDataDateTime -ADD CONSTRAINT - PK_UFRecordDataDateTime PRIMARY KEY CLUSTERED - ( - Id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -ALTER TABLE dbo.UFRecordDataInteger -ADD CONSTRAINT - PK_UFRecordDataInteger PRIMARY KEY CLUSTERED - ( - Id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -ALTER TABLE dbo.UFRecordDataLongString -ADD CONSTRAINT - PK_UFRecordDataLongString PRIMARY KEY CLUSTERED - ( - Id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds relationship between UFRecordFields and UFREcordData* tables. -ALTER TABLE dbo.UFRecordDataBit -ADD CONSTRAINT - FK_UFRecordDataBit_UFRecordFields_Key FOREIGN KEY - ( - [Key] - ) REFERENCES dbo.UFRecordFields - ( - [Key] - ) ON UPDATE NO ACTION - ON DELETE NO ACTION -GO - -ALTER TABLE dbo.UFRecordDataDateTime -ADD CONSTRAINT - FK_UFRecordDataDateTime_UFRecordFields_Key FOREIGN KEY - ( - [Key] - ) REFERENCES dbo.UFRecordFields - ( - [Key] - ) ON UPDATE NO ACTION - ON DELETE NO ACTION -GO - -ALTER TABLE dbo.UFRecordDataInteger -ADD CONSTRAINT - FK_UFRecordDataInteger_UFRecordFields_Key FOREIGN KEY - ( - [Key] - ) REFERENCES dbo.UFRecordFields - ( - [Key] - ) ON UPDATE NO ACTION - ON DELETE NO ACTION -GO - -ALTER TABLE dbo.UFRecordDataLongString -ADD CONSTRAINT - FK_UFRecordDataLongString_UFRecordFields_Key FOREIGN KEY - ( - [Key] - ) REFERENCES dbo.UFRecordFields - ( - [Key] - ) ON UPDATE NO ACTION - ON DELETE NO ACTION -GO - --- Adds index on foreign key fields in UFREcordData* tables. -CREATE NONCLUSTERED INDEX IX_UFRecordDataBit_Key ON dbo.UFRecordDataBit -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -CREATE NONCLUSTERED INDEX IX_UFRecordDataDateTime_Key ON dbo.UFRecordDataDateTime -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -CREATE NONCLUSTERED INDEX IX_UFRecordDataInteger_Key ON dbo.UFRecordDataInteger -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - -CREATE NONCLUSTERED INDEX IX_UFRecordDataLongString_Key ON dbo.UFRecordDataLongString -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds primary key to UFUserSecurity. -ALTER TABLE dbo.UFUserSecurity -ADD CONSTRAINT - PK_UFUserSecurity PRIMARY KEY CLUSTERED - ( - [User] - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds primary key to UFUserFormSecurity. -ALTER TABLE dbo.UFUserFormSecurity -ADD CONSTRAINT - PK_UFUserFormSecurity PRIMARY KEY CLUSTERED - ( - Id - ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds unique constraint to UFUserFormSecurity across user/form fields. -ALTER TABLE dbo.UFUserFormSecurity -ADD CONSTRAINT UK_UFUserFormSecurity_User_Form UNIQUE NONCLUSTERED -( - [User] ASC, - [Form] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -``` - -## Revert application of keys and indexes - -```sql -/* - Reverts application of recommended primary keys, foreign keys and indexes to core Umbraco Forms tables. - This reverts for SQL Server the migration AddRecordKeysAndIndexes and can be used for rolling that back in testing. - */ - --- Reverts addition of relationship between UFRecords and UFRecordFields. -ALTER TABLE dbo.UFRecordFields -DROP CONSTRAINT IF EXISTS FK_UFRecordFields_UFRecords_Record -GO - --- Reverts addition of primary keys to UFRecordData* tables. -ALTER TABLE dbo.UFRecordDataBit -DROP CONSTRAINT IF EXISTS PK_UFRecordDataBit -GO - -ALTER TABLE dbo.UFRecordDataDateTime -DROP CONSTRAINT IF EXISTS PK_UFRecordDataDateTime -GO - -ALTER TABLE dbo.UFRecordDataInteger -DROP CONSTRAINT IF EXISTS PK_UFRecordDataInteger -GO - -ALTER TABLE dbo.UFRecordDataLongString -DROP CONSTRAINT IF EXISTS PK_UFRecordDataLongString -GO - --- Reverts addition of relationship between UFRecordFields and UFREcordData* tables. -ALTER TABLE dbo.UFRecordDataBit -DROP CONSTRAINT IF EXISTS FK_UFRecordDataBit_UFRecordFields_Key -GO - -ALTER TABLE dbo.UFRecordDataDateTime -DROP CONSTRAINT IF EXISTS FK_UFRecordDataDateTime_UFRecordFields_Key -GO - -ALTER TABLE dbo.UFRecordDataInteger -DROP CONSTRAINT IF EXISTS FK_UFRecordDataInteger_UFRecordFields_Key -GO - -ALTER TABLE dbo.UFRecordDataLongString -DROP CONSTRAINT IF EXISTS FK_UFRecordDataLongString_UFRecordFields_Key -GO - --- Reverts addition of index on foreign key fields in UFREcordData* tables. -DROP INDEX IF EXISTS IX_UFRecordDataBit_Key ON dbo.UFRecordDataBit -GO - -DROP INDEX IF EXISTS IX_UFRecordDataDateTime_Key ON dbo.UFRecordDataDateTime -GO - -DROP INDEX IF EXISTS IX_UFRecordDataInteger_Key ON dbo.UFRecordDataInteger -GO - -DROP INDEX IF EXISTS IX_UFRecordDataLongString_Key ON dbo.UFRecordDataLongString -GO - --- Reverts addition of primary key to UFUserSecurity -ALTER TABLE dbo.UFUserSecurity -DROP CONSTRAINT IF EXISTS PK_UFUserSecurity -GO - --- Reverts addition of primary key to UFUserFormSecurity -ALTER TABLE dbo.UFUserFormSecurity -DROP CONSTRAINT IF EXISTS PK_UFUserFormSecurity -GO - --- Reverts addition of unique constraint to UFUserFormSecurity across user/form fields. -ALTER TABLE dbo.UFUserFormSecurity -DROP CONSTRAINT IF EXISTS UK_UFUserFormSecurity_User_Form -GO -``` diff --git a/10/umbraco-forms/developer/healthchecks/forms-in-the-database-apply-keys.md b/10/umbraco-forms/developer/healthchecks/forms-in-the-database-apply-keys.md deleted file mode 100644 index 9030d0c1eeb..00000000000 --- a/10/umbraco-forms/developer/healthchecks/forms-in-the-database-apply-keys.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -meta.Title: "Apply keys and indexes for forms in the database" ---- - -# Apply keys and indexes for forms in the database - -```sql -/* - Applies recommended primary keys, foreign keys and indexes to Umbraco Forms tables relating to "forms in the database" (i.e. - when configuration key StoreUmbracoFormsInDb = true). - This replicates for SQL Server the migration AddFormKeysAndIndexes. - */ - --- Adds unique constraint to UFForms. -ALTER TABLE dbo.UFForms -ADD CONSTRAINT UK_UFForms_Key UNIQUE NONCLUSTERED -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds unique constraint to UFDataSource. -ALTER TABLE dbo.UFDataSource -ADD CONSTRAINT UK_UFDataSource_Key UNIQUE NONCLUSTERED -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds unique constraint to UFPrevalueSource. -ALTER TABLE dbo.UFPrevalueSource -ADD CONSTRAINT UK_UFPrevalueSource_Key UNIQUE NONCLUSTERED -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds unique constraint to UFWorkflows. -ALTER TABLE dbo.UFWorkflows -ADD CONSTRAINT UK_UFWorkflows_Key UNIQUE NONCLUSTERED -( - [Key] ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO - --- Adds index on join field in UFWorkflows. -CREATE NONCLUSTERED INDEX IX_UFWorkflows_FormId ON dbo.UFWorkflows -( - FormId ASC -) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] -GO -``` - -## Reverting the application of keys and indexes - -```sql -/* - Reverts application of recommended primary keys, foreign keys and indexes to Umbraco Forms tables relating to "forms in the database" (i.e. - when configuration key StoreUmbracoFormsInDb = true). - This reverts for SQL Server the migration AddFormKeysAndIndexes and can be used for rolling that back in testing. - */ - --- Reverts addition of unique constraint to UFForms. -ALTER TABLE dbo.UFForms -DROP CONSTRAINT IF EXISTS UK_UFForms_Key -GO - --- Reverts addition of unique constraint to UFPrevalueSource. -ALTER TABLE dbo.UFDataSource -DROP CONSTRAINT IF EXISTS UK_UFDataSource_Key -GO - --- Reverts addition of unique constraint to UFPrevalueSource. -ALTER TABLE dbo.UFPrevalueSource -DROP CONSTRAINT IF EXISTS UK_UFPrevalueSource_Key -GO - --- Reverts addition of unique constraint to UFWorkflows. -ALTER TABLE dbo.UFWorkflows -DROP CONSTRAINT IF EXISTS UK_UFWorkflows_Key -GO - --- Reverts addition of index on foreign key fields in UFWorkflows. -DROP INDEX IF EXISTS IX_UFWorkflows_FormId ON dbo.UFWorkflows -GO - --- Reverts addition of index on foreign key fields in UFWorkflows. -DROP INDEX IF EXISTS IX_UFWorkflows_FormId ON dbo.UFWorkflows -GO -``` diff --git a/10/umbraco-forms/developer/healthchecks/images/Umb-backoffice (1).png b/10/umbraco-forms/developer/healthchecks/images/Umb-backoffice (1).png deleted file mode 100644 index 7c006f92ca1..00000000000 Binary files a/10/umbraco-forms/developer/healthchecks/images/Umb-backoffice (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/healthchecks/images/Umb-backoffice.png b/10/umbraco-forms/developer/healthchecks/images/Umb-backoffice.png deleted file mode 100644 index 7c006f92ca1..00000000000 Binary files a/10/umbraco-forms/developer/healthchecks/images/Umb-backoffice.png and /dev/null differ diff --git a/10/umbraco-forms/developer/healthchecks/images/healthcheck (1).png b/10/umbraco-forms/developer/healthchecks/images/healthcheck (1).png deleted file mode 100644 index c701f83f778..00000000000 Binary files a/10/umbraco-forms/developer/healthchecks/images/healthcheck (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/healthchecks/images/healthcheck.png b/10/umbraco-forms/developer/healthchecks/images/healthcheck.png deleted file mode 100644 index c701f83f778..00000000000 Binary files a/10/umbraco-forms/developer/healthchecks/images/healthcheck.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/assign-sensitive-data-to-user.png b/10/umbraco-forms/developer/images/assign-sensitive-data-to-user.png deleted file mode 100644 index a1cafe90d27..00000000000 Binary files a/10/umbraco-forms/developer/images/assign-sensitive-data-to-user.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/content-app (1) (1).png b/10/umbraco-forms/developer/images/content-app (1) (1).png deleted file mode 100644 index 2ebbfbbf08a..00000000000 Binary files a/10/umbraco-forms/developer/images/content-app (1) (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/content-app (1).png b/10/umbraco-forms/developer/images/content-app (1).png deleted file mode 100644 index 2ebbfbbf08a..00000000000 Binary files a/10/umbraco-forms/developer/images/content-app (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/content-app.png b/10/umbraco-forms/developer/images/content-app.png deleted file mode 100644 index 2ebbfbbf08a..00000000000 Binary files a/10/umbraco-forms/developer/images/content-app.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/exclude-scripts-v9 (1).png b/10/umbraco-forms/developer/images/exclude-scripts-v9 (1).png deleted file mode 100644 index d592b5e73d6..00000000000 Binary files a/10/umbraco-forms/developer/images/exclude-scripts-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/exclude-scripts-v9 (2).png b/10/umbraco-forms/developer/images/exclude-scripts-v9 (2).png deleted file mode 100644 index d592b5e73d6..00000000000 Binary files a/10/umbraco-forms/developer/images/exclude-scripts-v9 (2).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/exclude-scripts-v9.png b/10/umbraco-forms/developer/images/exclude-scripts-v9.png deleted file mode 100644 index d592b5e73d6..00000000000 Binary files a/10/umbraco-forms/developer/images/exclude-scripts-v9.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/exclude-scripts.png b/10/umbraco-forms/developer/images/exclude-scripts.png deleted file mode 100644 index 571bd847008..00000000000 Binary files a/10/umbraco-forms/developer/images/exclude-scripts.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/form-guid (1).png b/10/umbraco-forms/developer/images/form-guid (1).png deleted file mode 100644 index 71a21c7618c..00000000000 Binary files a/10/umbraco-forms/developer/images/form-guid (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/form-guid.png b/10/umbraco-forms/developer/images/form-guid.png deleted file mode 100644 index 71a21c7618c..00000000000 Binary files a/10/umbraco-forms/developer/images/form-guid.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/mark-field-as-sensitive.png b/10/umbraco-forms/developer/images/mark-field-as-sensitive.png deleted file mode 100644 index 06f2496feab..00000000000 Binary files a/10/umbraco-forms/developer/images/mark-field-as-sensitive.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/select-a-theme (1).png b/10/umbraco-forms/developer/images/select-a-theme (1).png deleted file mode 100644 index 985dd572041..00000000000 Binary files a/10/umbraco-forms/developer/images/select-a-theme (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/select-a-theme.png b/10/umbraco-forms/developer/images/select-a-theme.png deleted file mode 100644 index 985dd572041..00000000000 Binary files a/10/umbraco-forms/developer/images/select-a-theme.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/sensitive-data-field.png b/10/umbraco-forms/developer/images/sensitive-data-field.png deleted file mode 100644 index 82243d3840d..00000000000 Binary files a/10/umbraco-forms/developer/images/sensitive-data-field.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/user-group-permissions (1).png b/10/umbraco-forms/developer/images/user-group-permissions (1).png deleted file mode 100644 index 43e7df5cb94..00000000000 Binary files a/10/umbraco-forms/developer/images/user-group-permissions (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/user-group-permissions.png b/10/umbraco-forms/developer/images/user-group-permissions.png deleted file mode 100644 index 43e7df5cb94..00000000000 Binary files a/10/umbraco-forms/developer/images/user-group-permissions.png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/user-start-folders (1).png b/10/umbraco-forms/developer/images/user-start-folders (1).png deleted file mode 100644 index ff01a21c28c..00000000000 Binary files a/10/umbraco-forms/developer/images/user-start-folders (1).png and /dev/null differ diff --git a/10/umbraco-forms/developer/images/user-start-folders.png b/10/umbraco-forms/developer/images/user-start-folders.png deleted file mode 100644 index ff01a21c28c..00000000000 Binary files a/10/umbraco-forms/developer/images/user-start-folders.png and /dev/null differ diff --git a/10/umbraco-forms/developer/iprevaluetextfilestorage.md b/10/umbraco-forms/developer/iprevaluetextfilestorage.md deleted file mode 100644 index f4af6c4735c..00000000000 --- a/10/umbraco-forms/developer/iprevaluetextfilestorage.md +++ /dev/null @@ -1,69 +0,0 @@ -# Storing Prevalue Text Files With IPreValueTextFileStorage - -Umbraco Forms contains a built-in `Get value from textfile` [Prevalue Source Type](extending/adding-a-prevaluesourcetype.md) that stores the uploaded text file into the physical file system (by default in `umbraco\Data\UmbracoForms\PreValueTextFiles`). - -You can replace the default implementation by writing your own `IPreValueTextFileStorage` and registering that using e.g. `builder.Services.AddUnique()` (in `Startup.cs` or a composer). - -You can also use/inherit from `PreValueTextFileSystemStorage` to change the underlying `IFileSystem` that's used to store the prevalue text files. - -## Move files to Media file system - -You can use the following composer to move the prevalue text files into the media file system. If the media file system is using Azure Blob Storage, this will remove the files from the local physical file system. - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.IO; -using Umbraco.Cms.Core.Scoping; -using Umbraco.Forms.Core.Data; - -public class PreValueTextFileSystemStorageComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - => builder.Services.AddUnique(factory => new PreValueTextFileSystemStorage( - factory.GetRequiredService().FileSystem, - factory.GetRequiredService(), - "PreValueTextFiles")); -} -``` - -You need to manually move the existing files from `umbraco\Data\UmbracoForms\PreValueTextFiles` to your media storage. The final file path/URL will look like `~/media/PreValueTextFiles/{GUID}/{filename.txt}` and be accessible from the browser. - -## Move files to Azure Blob Storage - -First, install [Umbraco.StorageProviders.AzureBlob](https://github.com/umbraco/Umbraco.StorageProviders) and configure the Forms storage container, for example by adding the following to your `appsettings.json`: - -```json -{ - "Umbraco": { - "Storage": { - "AzureBlob": { - "Forms": { - "ConnectionString": "UseDevelopmentStorage=true", - "ContainerName": "sample-container" - } - } - } - } -} -``` - -Next, add the following composer that adds the Forms storage container and stores the prevalue text files into Azure Blob Storage (in `forms/PreValueTextFiles/{GUID}/{filename.txt}`): - -```csharp -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Infrastructure.Scoping; -using Umbraco.Forms.Core.Data; -using Umbraco.StorageProviders.AzureBlob.IO; - -public class PreValueTextFileSystemStorageComposer : IComposer -{ - public void Compose(IUmbracoBuilder builder) - => builder.AddAzureBlobFileSystem("Forms", options => options.VirtualPath = "~/forms") - .Services.AddUnique(factory => new PreValueTextFileSystemStorage( - factory.GetRequiredService().GetFileSystem("Forms"), - factory.GetRequiredService(), - "PreValueTextFiles")); -} -``` - -You need to manually move the existing files from `umbraco\Data\UmbracoForms\PreValueTextFiles` to your storage container. If you've disabled public access, the stored files are not accessible from the browser. diff --git a/10/umbraco-forms/developer/localization.md b/10/umbraco-forms/developer/localization.md deleted file mode 100644 index f18b95366df..00000000000 --- a/10/umbraco-forms/developer/localization.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -meta.Title: Localization ---- - -# Localization - -The labels, descriptions, and buttons that make up the backoffice screens for Umbraco Forms can be translated into different languages. - -When an editor chooses a language for their account, Umbraco CMS will render appropriate translations. The translations will contain a file for that language and a key for the label in question. If either of these can't be found, the label will be displayed in English (US). - -## Language Files - -Umbraco Forms ships with translations for the following languages: - - - Czech (`cs-cz.xml`) - - Danish (`da-dk.xml`) - - Spanish (`es-es.xml`) - - French (`fr-fr.xml`) - - Italian (`it-it.xml`) - - Polish (`pl-pl.xml`) - - UK English (`en-gb.xml`) - - US English (`en-us.xml`) - -If the language you require does not exist, it's possible to create your own by duplicating the default `en-us.xml` file. You can then save it with the appropriate culture code for the language you need and replace the English text with the translated version. - -As of Forms 10, the file no longer exists on disk and is shipped as part of the `Umbraco.Forms.StaticAssets` NuGet package. You can open this package, either locally using [Nuget Package Explorer](https://apps.microsoft.com/store/detail/nuget-package-explorer/9WZDNCRDMDM3?hl=en-gb&gl=gb&rtc=1), or [online](https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/) by clicking the "Open in NuGet Package Explorer" link. You'll find the file at `staticwebassets/Lang/en-us.xml`. - -Once translated, the new file should be saved into the `App_Plugins/UmbracoForms/app/lang/` folder. diff --git a/10/umbraco-forms/developer/magic-strings.md b/10/umbraco-forms/developer/magic-strings.md deleted file mode 100644 index 7ad6960fe48..00000000000 --- a/10/umbraco-forms/developer/magic-strings.md +++ /dev/null @@ -1,117 +0,0 @@ -# Magic Strings - -Umbraco Forms has some magic strings that enable you to render values from various sources, such as session, cookies and Umbraco page fields. - -## Where can I use magic strings? - -Magic strings can be used in form fields as a label, description or default value. As an example they can be used in default values in hidden fields - normally in the form of referral codes from a session, cookie or request item. - -These values can also be used for properties and settings in workflows. This means you can use name and email fields from a form to create a personal 'Thank you' email. - -## Sources of magic string values - -### Request - -`[@SomeRequestItem]` this allows you to display an item from the current `HttpContext.Request` with the key of 'SomeRequestItem'. - -Some examples of variables that are normally available in `HttpContext.Request`: - -* `[@Url]`: Insert the current URL -* `[@Http_Referer]`: The previous visited URL (if available) -* `[@Remote_Addr]`: The IP address of the visitor (stored by default by Umbraco) -* `[@Http_User_Agent]`: The browser of the visitor - -The variables are not case-sensitive. - -You can use it for any available query string variable in the URL as well. If your URL has the query string `?email=foobar@umbraco.com`, you can get the value of the query string into your field by using `[@email]`. - -### Dictionary Items - -For multi-lingual websites, rather than hard-coding labels like form field captions, a dictionary key can be entered as, for example, `#MyKey`. When the form is rendered, the placeholder will be replaced by the value of the dictionary item identified by the key, according to the current language. - -In most cases, the field must contain only the magic string for the replacement to be carried out. This makes sense for translated values, as you will want the whole phrase replaced when, for example, using one for a field's placeholder. - -We also translate dictionary keys found within the rich text field, which will be contained within HTML tags. Here we look for dictionary keys making up the full inner text of a tag. So for example, `

#myKey

` would be translated, but `

Lorem ipsum #myKey dolor sit amet.

` would not. - -### Session & Cookies - -`[%SomeSessionOrCookieItem]` this allows you to display an item from the current `HttpContext.Session` with the key of 'SomeSessionOrCookieItem'. The session key can only contain alphanumeric chars and you cannot use dots for example. `[%Member.Firstname]` cannot be used, but `[%MemberFirstname]` can be used. You would have to fill these session keys yourself. - -If the item cannot be found in the collection of session keys, it will then try to find the item from the `HttpContext.Cookies` collection with the same key. - -### Umbraco Page field - -`[#myUmbracoField]` this allows you to insert a property of that page and is based on the alias of the field. If your page has a property with the alias 'title', you can use `[#title]` in your form. - -Some extra variables are: - -* `[#pageName]`: The nodename of the current page -* `[#pageID]`: The node ID of the current page - -### Recursive Umbraco Page field - -`[$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. - -### 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. - -Some extra variables are: - -* `{record.id}`: The ID of the current record - this is only accessible on workflows triggered "on approve" rather than "on submit" -* `{record.updated}`: The updated date/time of the current record -* `{record.created}`: The created date/time of the current record -* `{record.umbracopageid}`: The Umbraco Page ID the form was submitted on -* `{record.uniqueid}`: The unique ID of the current record -* `{record.ip}`: The IP address that was used when the form was submitted -* `{record.memberkey}`: The member key that was used when the form was submitted - -### Member properties from a form submission - -`{member.FOO}` with the prefix of member, the same syntax will allow you to retrieve information about the submission if it was submitted by a logged-in member. - -## Formatting magic strings - -Using a magic string such as in the examples above will output the values exactly as read from the source. From Forms 10.2, it's possible to apply a format string to customize the output. - -The syntax follows that of AngularJS filters, i.e. `[ | : : ]`. - -For example, to truncate a string value read from an Umbraco page field with alias `title`, you would use: - -```none -[#title | truncate: 10] -``` - -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]` | - -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. - -Further magic string format functions can be [created in code](extending/adding-a-magic-string-format-function.md) for use in forms. - -## How can I parse these values elsewhere in my C# code or Razor Views? - -A service implemented by the `IPlaceholderParsingService` interface is available for use in custom code or views. It's found in the `Umbraco.Forms.Core.Services` namespace. - -In a controller you can inject it via the constructor and it can also be injected into views via: - -```csharp -@using Umbraco.Forms.Core.Services; -@inject IPlaceholderParsingService PlaceholderParsingService -``` - -The interface implements a single method, `ParsePlaceHolders`, that can be used for parsing magic strings. There are a few overloads available for use depending on the context. - -If parameters for the `Record` or `Form` are omitted, magic strings relating to these objects will be removed. - -There is also a public extension method `ParsePlaceHolders()` extending the `string` object in the `Umbraco.Forms.Core.Extensions` namespace, again available with some overloads allowing the provision of a `Form` or `Record` object if available. diff --git a/10/umbraco-forms/developer/prepping-frontend.md b/10/umbraco-forms/developer/prepping-frontend.md deleted file mode 100644 index 1816cd14c91..00000000000 --- a/10/umbraco-forms/developer/prepping-frontend.md +++ /dev/null @@ -1,72 +0,0 @@ -# Preparing your Frontend - -For Umbraco Forms to work correctly, you need to include some client dependencies. - -## Client-Side Validation - -Umbraco Forms ships with client-side form validation features provided by the [ASP.NET Client Validation library](https://github.com/haacked/aspnet-client-validation). - -You can use the following Razor helper to output script tags containing the dependencies. To access this method you will need a reference to `Umbraco.Forms.Web`: - -```csharp -@using Umbraco.Forms.Web - - @Html.RenderUmbracoFormDependencies() - -``` - -`Url` is a parameter passed into the method. It’s defined as a property on the base view model for an Umbraco template, so it will be automatically available in your Razor views. - -Alternatively, you can add the dependencies to the body tag: - -```csharp -@using Umbraco.Forms.Web -... - - - @Html.RenderUmbracoFormDependencies() - -``` - -All dependencies originate from your Umbraco Forms installation, which means that no external references are needed. - -## Validation Using jQuery - -If you want to use jQuery as your validation framework for Umbraco Forms, you can manually add the following client dependencies: - -- `jQuery` (JavaScript library) -- `jQuery validate` (jQuery plugin that provides client-side Form validation) -- `jQuery validate unobtrusive` (Add-on to jQuery Validation that provides unobtrusive validation via data-* attributes) - -You should remove any calls to `@Html.RenderUmbracoFormDependencies(Url)`. - -The easiest way to add the dependencies is to fetch them from a [CDN](https://en.wikipedia.org/wiki/Content_delivery_network). There are various CDN services you can use: - -- For example: [Microsoft CDN](https://docs.microsoft.com/en-us/aspnet/ajax/cdn/overview). -- Other CDN services you might want to look at are https://www.jsdelivr.com/ and https://cdnjs.com/about, which may offer better performance and more reliable service. - -To add the three client dependencies, see the examples below: - -**Example within `head` tags.** - -```html - - - - - -``` - -**Example within `body` tags.** - -When adding the script to the bottom of the page, you will also need to render the scripts. For more information, see [Rendering Forms Scripts](rendering-scripts.md) article. - -```html - - - - - - - -``` diff --git a/10/umbraco-forms/developer/rendering-forms.md b/10/umbraco-forms/developer/rendering-forms.md deleted file mode 100644 index 1369969c9d8..00000000000 --- a/10/umbraco-forms/developer/rendering-forms.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -description: Learn the different ways of rendering a form on your website when using Umbraco Forms. ---- - -# Rendering Forms - -There are three options available for rendering a form. - -## Rendering Using a View Component - -To display a form in your view, you can make a call to a view component: - -```cshtml -@await Component.InvokeAsync("RenderForm", new { formId = Guid.Parse("
"), theme = "default", includeScripts = false }) -``` - -Four 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) - -Usually, rather than hard-coding the form's GUID, you'll use a form and/or theme picker property on your page: - -```csharp -@await Component.InvokeAsync("RenderForm", new { formId = @Model.Form, theme = @Model.Theme, includeScripts = false }) -``` - -## Rendering Using a Tag Helper - -If you prefer a tag helper syntax, you can use one that ships with Umbraco Forms. - -Firstly, in your `_ViewImports.cshtml` file, add a reference to the Umbraco Forms tag helpers with: - -```cshtml -@addTagHelper *, Umbraco.Forms.Web -``` - -Then in your view you can use: - -```csharp -@if (Model.Form.HasValue) -{ - -} -``` - -## Rendering Using a Macro - -With a grid or Rich Text Editor, you need to use a macro. This is also available as an option to display a form in your view, where you provide three parameters: - -```cshtml -@await Umbraco.RenderMacroAsync("renderUmbracoForm", new { FormGuid = "", FormTheme = "default", ExcludeScripts = "1" }) -``` - -- `FormGuid` is the GUID of a form. -- `FormTheme` is the name of a theme. If not provided, the default theme is used. -- `ExcludeScripts` takes a value of 0 or 1, indicating whether scripts should be excluded from rendering. - -Similarly, you can reference a form picker property on your page: - -```cshtml -@if (Model.FormId is Guid formId) -{ - @await Umbraco.RenderMacroAsync("renderUmbracoForm", new { FormGuid = formId, FormTheme = Model.FormTheme, ExcludeScripts = "1" }) -} -``` \ No newline at end of file diff --git a/10/umbraco-forms/developer/rendering-scripts.md b/10/umbraco-forms/developer/rendering-scripts.md deleted file mode 100644 index daecb8ac8be..00000000000 --- a/10/umbraco-forms/developer/rendering-scripts.md +++ /dev/null @@ -1,74 +0,0 @@ -# Rendering Forms Scripts - -Forms output some JavaScript which is by default rendered right below the markup. - -In many cases, you might prefer rendering your scripts at the bottom of the page. For example, before the closing `` tag. This generally improves site performance. - -In order to render your scripts where you want, you need to add a snippet to your template. Make sure you add it below your scripts, right before the closing `` tag. - -By default, Forms uses `TempData` for tracking the forms rendered on a page. The stored values are used when rendering the form scripts and associated data. - -The following snippet should be used. - -```csharp -@using Umbraco.Forms.Web.Extensions; - -@if (TempData.Get("UmbracoForms") is Guid[] formIds) -{ - foreach (var formId in formIds) - { - @await Component.InvokeAsync("RenderFormScripts", new { formId, theme = "default" }) - } - - TempData.Remove("UmbracoForms"); -} -``` - -If you have changed the configuration value `TrackRenderedFormsStorageMethod` to use `HttpContext.Items`, the snippet is: - -```csharp -@if (Context.Items.TryGetValue("UmbracoForms", out object? formIdsObject) && formIdsObject is IEnumerable formIds) -{ - foreach (var formId in formIds) - { - @await Component.InvokeAsync("RenderFormScripts", new { formId, theme = "default" }) - } -} -``` - -Read more about this configuration option in the [configuration](./configuration/README.md#TrackRenderedFormsStorageMethod) article. - -If you prefer to use a tag helper, that's an option too. - -Firstly, in your `_ViewImports.cshtml` file, ensure you have a reference to the Umbraco Forms tag helpers with: - -```cshtml -@addTagHelper *, Umbraco.Forms.Web -``` - -Then instead of reading from `TempData` and invoking the view component directly, you can use: - -```cshtml - -``` - -This will use the appropriate storage method that you have configured. - -## Enabling `ExcludeScripts` - -If you do not want to render the associated scripts with a Form, you need to explicitly say so. You need to make sure `ExcludeScripts` is checked/enabled, whether you are inserting your Form using a macro or adding it directly in your template. - -To enable `ExcludeScripts`: - -* Using the **Insert Form with Theme** macro: - - ![Exclude scripts](images/exclude-scripts-v9.png) -* While inserting Forms **directly** in your template: - - ```csharp - @await Umbraco.RenderMacroAsync("renderUmbracoForm", new {FormGuid="6c3f053c-1774-43fa-ad95-710a01d9cd12", FormTheme="bootstrap3-horizontal", ExcludeScripts="1"}) - ``` - -{% hint style="info" %} -`ExcludeScripts = "1"` prevents the associated scripts from being rendered. Any other value, an empty value, or if the parameter is excluded, will render the scripts on the Form. -{% endhint %} diff --git a/10/umbraco-forms/developer/security.md b/10/umbraco-forms/developer/security.md deleted file mode 100644 index e988e12b550..00000000000 --- a/10/umbraco-forms/developer/security.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -meta.Title: Umbraco Forms security -description: How to secure access to Umbraco Forms data and functionality. ---- - -# Security - -Umbraco Forms has a backoffice security model integrated with Umbraco users. Details are managed in the _Users_ section of the backoffice, within a tree named _Form Security_. - -## User based permissions - -Within the _Form Security_ tree, each user with a backoffice account is listed. Clicking on a user allows each functional permission to be set: - -* _Manage forms_ - user can create and edit form definitions -* _View entries_ - user can view the submitted entries -* _Edit entries_ - user can edit the submitted entries -* _Manage datasources_ - user can create and edit datasource definitions -* _Manage prevalue sources_ - user can create and edit prevalue source definitions - -For further control, each form is listed and the user can be granted or denied access to each as appropriate. - -As new forms are created, users will automatically be granted access to them, unless the configuration setting `DefaultUserAccessToNewForms` has been set to a value of `Deny`. - -## Start folders - -When form definitions are configured for storage in the database, it allows for the creation of folders to group forms within. It's also possible to define one or more start folders for a user. This is done in order to limit their access to a subset of the forms available. - -If no start folders are selected, the user will be able to access all forms in the backoffice according to their permissions. - -If a single start folder is selected, that will act as the root of the tree view of forms. The user will have access to all folders and forms below that selected folder. - -If more than one start folder is selected, they will appear underneath the root of the tree view of forms. The user will have access to only those folders and their descendant folders and forms. - -![Start folders]() - -## User group based permissions - -A new model was introduced allowing for the management of permissions at the level of user groups. Particularly for installations with a large number of users, we expect this to be a more useful setup and require less ongoing administration. - -When user groups are involved in permissions, access to a particular resource or feature is determined by the following: - -* If the user has a specific user permission set, it is used in preference to anything set on the user groups they are a part of. -* If the user doesn't have a specific user permission set, they are granted access if at least one of the user groups they are part of has access. - -To enable the feature, it's necessary to update the `ManageSecurityWithUserGroups` configuration setting to `true`. - -With that in place the _Form Security_ tree divides into three sub-trees: - -* Under _Group Permissions_, each user group is listed and the same settings as described above for individual users can be set here. -* Under _User Permissions_, each user that has a specific user permission record is listed and can be managed. Records for users can be created or deleted via the tree's action menu. - -As new forms are created, user groups with aliases listed in the `GrantAccessToNewFormsForUserGroups` configuration setting will be automatically given access. For example, with a value of `admin,editor`, the built-in Administrators and Editors groups would have access. - -### Start folders for user groups - -Start folders are enabled for User Groups. They work in a similar way as the group based permissions described above: - -* If the user has a specific user permission set, it is used in preference to anything set on the user groups they are a part of. - * This means if the user has no start folders defined and the groups they are part of do, they will have access to the root of the Forms tree and be able to access all folders and Forms. -* If the user doesn't have a specific user permission set, they are granted access to all the unique folders the groups they are part of have access to. - * If they are part of any group that has access to the forms section, permission to manage forms and no start folders defined, they will have access to the root of the Forms tree and be able to access all folders and Forms. - -### Migrating to user group based permissions - -In introducing the user group based permissions, we've taken care to ensure a migration path. This is available for those existing installations running on older versions of Umbraco Forms. In that situation, we'd recommend the following approach. - -* Upgrade to Umbraco 9.3. -* At this stage nothing will have changed in terms of the permissions model in use. -* Set the `ManageSecurityWithUserGroups` configuration value to `true` and the `GrantAccessToNewFormsForUserGroups` as appropriate for your setup. -* Via the _Users > Form Security_ section, set the required permissions on each user group. -* Again at this point nothing will have changed with regard the effective permissions for each user, as they will currently all have an existing user permission record. -* Via _Users > Form Security > User permissions_, delete the permission records for each user. -* The effective permissions for each user will now be derived from their user groups. -* If you have any exceptions - where a particular user needs a particular combination of permissions that you can't or don't want to provide via the user groups - it's always possible to re-create a user permission record that will take precedence over the group based permissions. - -![User group permissions]() - -## Handling Sensitive Data in Umbraco Forms - -Marking fields and properties as sensitive will hide the data in those fields for backoffice users that are not privy to the data. Built-in features are available to help you secure sensitive information. For more information, see the [Sensitive data](../../umbraco-cms/reference/security/sensitive-data-on-members.md) article. - -The following sections covers how to grant or deny access to sensitive data for specific users and how to mark form questions as sensitive. - -### Assigning Users to the Sensitive Data Group - -To allow users to view and handle sensitive data in Umbraco Forms, you must assign them to the _Sensitive Data_ user group: - -1. Navigate to the **Users** section in the Umbraco Backoffice. -2. Select the user you want to grant access to. -3. Click **Choose** in the Groups field under the **Assign access** section. -4. Select **Sensitive Data** from the list of User Groups. -5. Click **Submit**. -6. Click **Save**. - -![Assigning Users to the Sensitive Data Group](images/assign-sensitive-data-to-user.png) - -### Marking Questions in Forms as Sensitive - -Once the users are set up with the appropriate permissions, the next step is to identify which form fields should be marked as sensitive. - -Marking a field as sensitive ensures that only authorized users in the Sensitive Data user group can access data from these fields. - -To mark questions as sensitive, follow these steps: - -1. Navigate to the **Forms** section in the Umbraco Backoffice. -2. Open the form you wish to configure (for example: Contact Form). -3. Click on the cogwheel icon next to the form field you want to secure. -4. Enable the **Sensitive data** setting for the field. - -![Mark Question as Sensitive](images/mark-field-as-sensitive.png) - -5. Click **Submit**. -6. Click **Save**. - -![Sensitive Data on Field](images/sensitive-data-field.png) \ No newline at end of file diff --git a/10/umbraco-forms/developer/themes.md b/10/umbraco-forms/developer/themes.md deleted file mode 100644 index ace2feb962a..00000000000 --- a/10/umbraco-forms/developer/themes.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -meta.Title: Theming Umbraco Forms -description: Documentation on how to apply custom themes to Umbraco Forms ---- - -# Themes - -Umbraco Forms supports Themes, allowing forms to be customized in a much simpler manner. - -## Creating a Theme - -To create a theme, you need to create a folder at `/Views/Partials/Forms/Themes/`. The name of the folder is the name of theme that will be visible in the backoffice when choosing it. - -Copy the explicit files you wish to override in your theme, it may be a single file or all files from the `default` theme folder. Make the necessary changes you desire to CSS class names, markup etc. - -### Obtaining the Default Theme Files - -For Umbraco 9 and previous, it's straightforward to copy the files you need from the default theme folder. We highly recommend that you never customize any files found in the `default` themes folder. There is a risk that any customizations to these files will be lost with any future upgrades you do to Umbraco Forms. Umbraco 10+ distributes these files as part of a Razor Class Library, so you won't find them on disk. Instead you should download the appropriate zip file for your Forms version and extract the ones you need. - -You can obtain the latest version of the Forms default theme from the following links: - -* [10.0.0-rc1](./files/umbraco-forms-default-theme-10.0.0-rc1.zip) -* [10.1.0](./files/umbraco-forms-default-theme-10.1.0.zip) -* [10.2.0](./files/umbraco-forms-default-theme-10.2.0.zip) -* [10.2.4](./files/umbraco-forms-default-theme-10.2.4.zip) -* [10.3.0](./files/umbraco-forms-default-theme-10.3.0.zip) -* [10.5.0-rc1](./files/umbraco-forms-default-theme-10.5.0-c1.zip) -* [10.5.1](./files/umbraco-forms-default-theme-10.5.1.zip) -* [10.5.2](./files/umbraco-forms-default-theme-10.5.2.zip) -* [10.5.3](./files/umbraco-forms-default-theme-10.5.3.zip) -* [10.5.5](./files/umbraco-forms-default-theme-10.5.5.zip) -* [10.5.6](./files/umbraco-forms-default-theme-10.5.6.zip) - -You should use the theme available for the highest version that's less or equal to the version of Forms you have installed. For example, when using Umbraco Forms 10.4.0, and no file for that version is available use version 10.3.0 instead. - -### Amending Theme Files - -{% hint style="info" %} -Umbraco Forms conditional JavaScript logic depends on some CSS classes currently and it is advised that you add any additional classes you require but **do not remove those already being set**. -{% endhint %} - -If adding or amending client-side scripts, you need to copy the `Script.cshtml` file from the `default` themes folder. In your copy, amend the `.js` references to reference your own script files. - -## Using a Theme - -To use a theme with a Form use the "Insert Form" macro where you will be presented with the options of the form you wish to insert along with an option to pick a theme. This displays the list of theme folders found at `Views/Partials/Forms/Themes`. - -![Choosing and using a theme](../../../11/umbraco-forms/developer/images/select-a-theme.png) - -When you are rendering your form directly in your template, you need to specify your theme by filling out the `FormTheme` attribute: - -```csharp -@await Umbraco.RenderMacroAsync("renderUmbracoForm", new {FormGuid="1ec026cb-d4d3-496c-b8e8-90e0758c78d8", FormTheme="MyFormTheme", ExcludeScripts="0"}) -``` - -If you do not pick and/or set a theme, the `default` theme will be used to render the form. - -## Theme Fallbacks - -When using a theme, Umbraco Forms will try to use a view from the theme folder, but then fallback to the same view in the default theme folder if it can't be found. This allows you to create a theme by only modifying the files necessary to make your customizations. - -Files which can be overridden: - -* Render.cshtml (overrides the entire form - usually not needed) -* Form.cshtml (overrides the generation of the fields on the current page) -* Script.cshtml (overrides the way files are included with the form) -* /Fieldtypes/FieldType.\*.cshtml (overrides a specific view for a field) - -## Helper Methods - -### SetFormThemeCssFile - -Sets the primary form theme stylesheet path. This overrides an already assigned stylesheet and will be rendered out when inserting the form into the page - -```csharp -Html.SetFormThemeCssFile(Model, "~/App_Plugins/UmbracoForms/Assets/Themes/Default/style.css") -``` - -### AddFormThemeScriptFile - -Add a JavaScript file path to include on form render - -```csharp -Html.AddFormThemeScriptFile("~/App_Plugins/UmbracoForms/Assets/themes/default/umbracoforms.js"); -``` - -### SetFormFieldClass - -Adds a class to the form field HTML element of a given type. If no type is given, it will add the class to all fields - -```csharp -// Applies the CSS class 'form-control' to all fields that GetFormFieldClass uses in FieldType views -@Html.SetFormFieldClass("form-control") - -// Applies the CSS class 'some-other-class' for the FieldType of the name 'Password' -@Html.SetFormFieldClass("some-other-class", "Password") -``` - -### GetFormFieldClass - -Retrieves all classes for a given field type, used when rendering form fieldtype partial views - -```csharp -class="@Html.GetFormFieldClass(Model.FieldTypeName)" -``` - -### SetFormFieldWrapperClass - -Adds a class to the div element wrapping around form fields of a given type. If no type is given, it will add the class to all fields - -```csharp -// Applies the CSS class 'form-group' around all fields, labels & help texts -@Html.SetFormFieldWrapperClass("form-group") - -// Applies the CSS class 'some-other-class' for the FieldType of the name 'Password' -@Html.SetFormFieldWrapperClass("some-other-class", "Password") -``` - -### GetFormFieldWrapperClass - -Retrieves all wrapper classes for a given field type, used when rendering form fields. This class wraps both label, help-text and the field itself in the default view - -```csharp -class="@Html.GetFormFieldWrapperClass(f.FieldTypeName)" -``` diff --git a/10/umbraco-forms/developer/working-with-data.md b/10/umbraco-forms/developer/working-with-data.md deleted file mode 100644 index 0647845168f..00000000000 --- a/10/umbraco-forms/developer/working-with-data.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -description: Developer documentation on working with Forms record data. ---- - -# Working With Record Data - -Umbraco Forms includes some helper methods that return records of a given Form, which can be used to output records in your templates using razor. - -## Available Methods - -The methods can be found by injecting the `Umbraco.Forms.Core.Services.IRecordReaderService` interface. For performance reasons, all these methods are paged. - -### GetApprovedRecordsFromPage - -```csharp -PagedResult GetApprovedRecordsFromPage(int pageId, int pageNumber, int pageSize) -``` - -Returns all records with the state set to approved from all Forms on the Umbraco page with the id = `pageId` . - -### GetApprovedRecordsFromFormOnPage - -```csharp -PagedResult GetApprovedRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize) -``` - -Returns all records with the state set to approved from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult`. - -### GetApprovedRecordsFromForm - -```csharp -PagedResult GetApprovedRecordsFromForm(Guid formId, int pageNumber, int pageSize) -``` - -Returns all records with the state set to approved from the Form with the ID = `formId` as a `PagedResult`. - -### GetRecordsFromPage - -```csharp -PagedResult GetRecordsFromPage(int pageId, int pageNumber, int pageSize) -``` - -Returns all records from all Forms on the Umbraco page with the id = `pageId` as a `PagedResult`. - -### GetRecordsFromFormOnPage - -```csharp -PagedResult GetRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize) -``` - -Returns all records from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult`. - -### GetRecordsFromForm - -```csharp -PagedResult GetRecordsFromForm(Guid formId, int pageNumber, int pageSize) -``` - -Returns all records from the Form with the ID = formId as a `PagedResult`. - -## The returned objects - -All of these methods will return an object of type `PagedResult` so you can iterate through the `IRecord` objects. - -The properties available on a `IRecord` are: - -```csharp -int Id -FormState State -DateTime Created -DateTime Updated -Guid Form -string IP -int UmbracoPageId -string MemberKey -Guid UniqueId -Dictionary RecordFields -``` - -In order to access custom Form fields, these are available in the `RecordFields` property. Furthermore there exists an extension method named `ValueAsString` on `IRecord` in `Umbraco.Forms.Core.Services`, such that you can get the value as string given the alias of the field. - -This extension method handle multi value fields by comma separating the values. E.g. "A, B, C" - -## Sample razor script - -Sample script that is outputting comments using a Form created with the default comment Form template. - -```csharp -@using Umbraco.Core; -@using Umbraco.Cms.Core.Composing; -@using Umbraco.Forms.Core.Services; -@inject IRecordReaderService _recordReaderService; - -
    - @foreach (var record in _recordReaderService.GetApprovedRecordsFromPage(Model.Id, 1, 10).Items) - { -
  • - @record.Created.ToString("dd MMMM yyy") - @if(string.IsNullOrEmpty(record.ValueAsString("email"))){ - @record.ValueAsString("name") - } - else{ - - @record.ValueAsString("name") - - } - said -

    @record.ValueAsString("comment")

    -
  • - } -
-``` diff --git a/10/umbraco-forms/editor/attaching-workflows/README.md b/10/umbraco-forms/editor/attaching-workflows/README.md deleted file mode 100644 index 7d0a021c0e7..00000000000 --- a/10/umbraco-forms/editor/attaching-workflows/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Attaching Workflows - -In this article, you can learn how to add extra functionality to your Form by attaching **workflows**. - -Workflows are a way of defining actions after your Form is submitted like sending an email or creating a content node. - -## Default Workflow - -By default, when a Form is submitted the record data is stored in the database. This can be configured in the [Store records](../creating-a-form/form-settings.md#settings-options) of the Forms settings. - -The behavior to display a message to the user who submitted the form can be configured by clicking on the built-in first workflow step. This step is labelled **Submit message/Go to page**, and it can also configure the redirection to another page. - -![Submit message/Go to page](images/MessageOnSubmit.png) - -If a value is selected for **Go to page**, it will be used to redirect to that page once the form has been submitted. - -If no value is selected, the message in **Message on submit** is displayed to the user on the same page, instead of the form fields. This is implemented via a redirect to the current page, ensuring that the form can't be accidentally resubmitted. - -By default, the message is created and rendered in plain text. If you need to add formatting to the message, toggle the **Format message in rich text** button. - -![Submit message/Go to page](../../../../13/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmitRichText.png) - -## Video Tutorial - -{% embed url="https://www.youtube.com/watch?ab_channel=UmbracoLearningBase&v=qJrf1drw1Bg" %} -Attaching Workflows to Umbraco Forms -{% endembed %} - -## Adding a Workflow - -At the bottom of your Form, a default workflow is already attached to the Form, as well as an option to configure the workflows. - -![Button]() - -Clicking **Configure workflow** will give you the option to configure existing workflows, as well as setup new ones. - -![Workflow add](images/WorkflowsPage.png) - -### Choose a Workflow - -A new workflow can be of different types and Umbraco Forms ships with a few default ones. You can find an overview of the types in the [Workflow types](workflow-types.md) article. - -![Workflow add modal]() - -### Update Type-specific Settings - -Once the Workflow Type has been selected, you will need to configure the workflow. There are different settings depending on the type that has been selected. - -To use data from the submitted Form in your workflow, head over to the [Magic Strings](../../developer/magic-strings.md) article and learn more about how that's done. - -### Configuring Condition on a Workflow - -You can apply conditions to a workflow to ensure it only triggers under specific circumstances. You could as an example enable a condition that enables sending an email only if an email is added. - -Select **Enable conditions** to open the condition editor. In the condition editor, you will see options to create logic that determines when the workflow should run. The condition is generally based on the values of the form fields. - -For example: You have a form with a dropdown field labeled **Preferred Contact Method** with options such as **Email** and **Phone**. You can set up a workflow that sends an email notification only when the user selects **Email**. - -![Workflow Conditions](images/workflow-conditions.png) - -Now, this email notification will only be sent when the user selects **Email** as their preferred contact method. - -Fill in the rest of the settings and click **Submit**. The workflow is added to your Form and displayed at the bottom of the page. - -## Workflow Processing - -When a form is submitted, any workflows associated with the "submit" stage of the form will run sequentially in the configured order. The record is stored after these workflows are completed, and as such they can make changes to the information recorded. - -Similarly, approval of a form entry, whether automatic or manual, will trigger the execution of the workflows associated with the "approve" stage. - -If a workflow encounters an unexpected error, it will silently fail from the perspective of the user submitting the form. The exception along with the other details of the failed operation is recorded to the log. - -From Umbraco Forms versions 8.13.0 and 10.1, an audit trail has been made available. In the list of entries for a form, a summary is presented that shows how many workflows were executed, and how many were successful: - -![Workflow execution summary](images/workflow-summary.png) - -For each entry, in the backoffice a table can be viewed that shows each of the workflows and the success, or otherwise, of the operation. - -![Workflow execution summary](images/workflow-audit.png) - -For any workflows that did not complete successfully, a "Retry" link is available to trigger the workflow again. This is useful for example if there was a temporary infrastructure issue that perhaps prevented an email going out. You would be able to retrigger the workflow once the issue is resolved. diff --git a/10/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmit (1).png b/10/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmit (1).png deleted file mode 100644 index 60cd7c57306..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmit (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmit.png b/10/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmit.png deleted file mode 100644 index 60cd7c57306..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/MessageOnSubmit.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowOverview.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowOverview.png deleted file mode 100644 index f156cca1d26..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowOverview.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/Workflownode.png b/10/umbraco-forms/editor/attaching-workflows/images/Workflownode.png deleted file mode 100644 index c236ee78763..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/Workflownode.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModal.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModal.png deleted file mode 100644 index 3039c8ddd0f..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModal.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModel (1).png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModel (1).png deleted file mode 100644 index 66598e8f552..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModel (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModel.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModel.png deleted file mode 100644 index 66598e8f552..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsAddModel.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPage (1).png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPage (1).png deleted file mode 100644 index 01815fa21e2..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPage (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPage.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPage.png deleted file mode 100644 index 01815fa21e2..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPage.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAdd.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAdd.png deleted file mode 100644 index d924d7e420a..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAdd.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddAdd.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddAdd.png deleted file mode 100644 index 49468a6b78f..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddAdd.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddSelectType.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddSelectType.png deleted file mode 100644 index 1de9c4fc42f..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddSelectType.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddSubmit.PNG b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddSubmit.PNG deleted file mode 100644 index 544ea10c7c5..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddSubmit.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddTypeSettings.png b/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddTypeSettings.png deleted file mode 100644 index c34d27e5e45..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/WorkflowsPageAddTypeSettings.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/change-record-state (1).png b/10/umbraco-forms/editor/attaching-workflows/images/change-record-state (1).png deleted file mode 100644 index 85a3e5f177f..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/change-record-state (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/change-record-state.png b/10/umbraco-forms/editor/attaching-workflows/images/change-record-state.png deleted file mode 100644 index 85a3e5f177f..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/change-record-state.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/configure-workflows (1).png b/10/umbraco-forms/editor/attaching-workflows/images/configure-workflows (1).png deleted file mode 100644 index a1419f8c13c..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/configure-workflows (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/configure-workflows.png b/10/umbraco-forms/editor/attaching-workflows/images/configure-workflows.png deleted file mode 100644 index a1419f8c13c..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/configure-workflows.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/create-new-node (1).png b/10/umbraco-forms/editor/attaching-workflows/images/create-new-node (1).png deleted file mode 100644 index fbf73980957..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/create-new-node (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/create-new-node.png b/10/umbraco-forms/editor/attaching-workflows/images/create-new-node.png deleted file mode 100644 index fbf73980957..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/create-new-node.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/email-slack (1).png b/10/umbraco-forms/editor/attaching-workflows/images/email-slack (1).png deleted file mode 100644 index 03c8585713d..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/email-slack (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/email-slack.png b/10/umbraco-forms/editor/attaching-workflows/images/email-slack.png deleted file mode 100644 index 03c8585713d..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/email-slack.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/post-as-xml (1).png b/10/umbraco-forms/editor/attaching-workflows/images/post-as-xml (1).png deleted file mode 100644 index ed22ad754a5..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/post-as-xml (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/post-as-xml.png b/10/umbraco-forms/editor/attaching-workflows/images/post-as-xml.png deleted file mode 100644 index ed22ad754a5..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/post-as-xml.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/save-as-an-xml-file (1).png b/10/umbraco-forms/editor/attaching-workflows/images/save-as-an-xml-file (1).png deleted file mode 100644 index f6f8b1f1b50..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/save-as-an-xml-file (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/save-as-an-xml-file.png b/10/umbraco-forms/editor/attaching-workflows/images/save-as-an-xml-file.png deleted file mode 100644 index f6f8b1f1b50..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/save-as-an-xml-file.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/save-as-content-node (1).png b/10/umbraco-forms/editor/attaching-workflows/images/save-as-content-node (1).png deleted file mode 100644 index 394b3f0c5d0..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/save-as-content-node (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/save-as-content-node.png b/10/umbraco-forms/editor/attaching-workflows/images/save-as-content-node.png deleted file mode 100644 index 394b3f0c5d0..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/save-as-content-node.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/send-email (1).png b/10/umbraco-forms/editor/attaching-workflows/images/send-email (1).png deleted file mode 100644 index 96b67e0ceb5..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/send-email (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/send-email-razor (1).png b/10/umbraco-forms/editor/attaching-workflows/images/send-email-razor (1).png deleted file mode 100644 index 59cbe74aa75..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/send-email-razor (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/send-email-razor.png b/10/umbraco-forms/editor/attaching-workflows/images/send-email-razor.png deleted file mode 100644 index 59cbe74aa75..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/send-email-razor.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/send-email.png b/10/umbraco-forms/editor/attaching-workflows/images/send-email.png deleted file mode 100644 index 96b67e0ceb5..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/send-email.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/send-to-URL (1).png b/10/umbraco-forms/editor/attaching-workflows/images/send-to-URL (1).png deleted file mode 100644 index 40b1ff4dfad..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/send-to-URL (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/send-to-URL.png b/10/umbraco-forms/editor/attaching-workflows/images/send-to-URL.png deleted file mode 100644 index 40b1ff4dfad..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/send-to-URL.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/workflow-audit (1).png b/10/umbraco-forms/editor/attaching-workflows/images/workflow-audit (1).png deleted file mode 100644 index 2f4b33b5502..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/workflow-audit (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/workflow-audit.png b/10/umbraco-forms/editor/attaching-workflows/images/workflow-audit.png deleted file mode 100644 index 2f4b33b5502..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/workflow-audit.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/workflow-conditions.png b/10/umbraco-forms/editor/attaching-workflows/images/workflow-conditions.png deleted file mode 100644 index e512d320b9f..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/workflow-conditions.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/workflow-summary (1).png b/10/umbraco-forms/editor/attaching-workflows/images/workflow-summary (1).png deleted file mode 100644 index cb1553920b8..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/workflow-summary (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/workflow-summary.png b/10/umbraco-forms/editor/attaching-workflows/images/workflow-summary.png deleted file mode 100644 index cb1553920b8..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/workflow-summary.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/workflowbutton.png b/10/umbraco-forms/editor/attaching-workflows/images/workflowbutton.png deleted file mode 100644 index 734758ffc9e..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/workflowbutton.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/xslt-email (1).png b/10/umbraco-forms/editor/attaching-workflows/images/xslt-email (1).png deleted file mode 100644 index faa1e070fd8..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/xslt-email (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/images/xslt-email.png b/10/umbraco-forms/editor/attaching-workflows/images/xslt-email.png deleted file mode 100644 index faa1e070fd8..00000000000 Binary files a/10/umbraco-forms/editor/attaching-workflows/images/xslt-email.png and /dev/null differ diff --git a/10/umbraco-forms/editor/attaching-workflows/workflow-types.md b/10/umbraco-forms/editor/attaching-workflows/workflow-types.md deleted file mode 100644 index 16970582dd5..00000000000 --- a/10/umbraco-forms/editor/attaching-workflows/workflow-types.md +++ /dev/null @@ -1,227 +0,0 @@ -# Workflow Types - -There are multiple built-in workflow types that can be used to extend the functionality of your Form. - -* [Change Record State](workflow-types.md#change-record-state) -* [Post as XML](workflow-types.md#post-as-xml) -* [Save as an XML file](workflow-types.md#save-as-an-xml-file) -* [Save as Umbraco Content Node](workflow-types.md#save-as-umbraco-content-node) -* [Send Email](workflow-types.md#send-email) -* [Send Email with Template (Razor)](workflow-types.md#send-email-with-template-razor) -* [Send Form to URL](workflow-types.md#send-form-to-url) -* [Send XSLT Transformed Email](workflow-types.md#send-xslt-transformed-email) -* [Slack](workflow-types.md#slack) - -## Video Tutorial - -{% embed url="https://www.youtube.com/watch?ab_channel=UmbracoLearningBase&v=L9k0yDbV6qo" %} -Workflow Types in Umbraco Forms -{% endembed %} - -## **Change Record State** - -![Change Record state]() - -Used to automatically **Approve Record** or **Delete Record** once it is submitted. Configure words that you want to match and select whether these words should trigger an approval or deletion of the record. - -## **Post as XML** - -![Post as XML]() - -Used to post the Form as an XML to a specified URL. The following configuration can be set: - -* Workflow Name -* URL (required) -* Method -* XsltFile - used to transform the XML -* Headers - map the needed files -* User -* Password - -## **Save as an XML file** - -![Save as XML]() - -Saves the result of the Form as an XML file by using XSLT. The following configuration can be set: - -* Workflow Name -* Path (required) - where to save the XML file -* File extension (required) -* XsltFile - used to transform the XML - -The path needs to point to a folder, not a file name. The files are then stored locally, and relative paths are resolved to the content root. - -{% hint style="info" %} -When storing the files within the `wwwroot` or `App_Plugins` folders, the files will be publicly available by default. -{% endhint %} - -## **Save as Umbraco Content Node** - -![Save as content node]() - -Saves a submitted Form as a new content node. You need to choose a Document type and match the fields in the Form with the properties on the selected Document Type. - -You can also choose to set a static value to fill in the properties: - -![Save as content node]() - -In the example above, a Document Type called **Blogpost** is selected for creating the new Content node. - -The value from the **Name** field will be added as the **Node Name** property in the new Content node. The value from the **Email** field will be used as the **Content** property. - -The following configuration can be set: - -* Workflow Name -* Publish - choose whether to publish the node on submission -* Where to save - choose a section in the content tree where this new node should be added - -## **Send Email** - -![Send email]() - -Sends the result of the Form to the specified email address. The following configuration can be set: - -* Workflow Name -* Message (required) -* Attachment - specify whether file uploads should be attached to the email -* Recipient Email (required) -* CC Email -* BCC Email -* Sender Email -* Reply To Email -* Subject of the email (required) - -If the _Sender Email_ field is not populated, the address used will be read from CMS configuration. - -The [Content Settings](https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/reference/configuration/contentsettings) value configured at `Umbraco:CMS:Content:Notifications:Email` will be used if provided. - -```json - "Umbraco": { - "CMS": { - "Content": { - "Notifications": { - "Email": "person@umbraco.dk" - } - } - } - } -``` - -If that is not set, the [Global Settings](https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/reference/configuration/globalsettings) value configured at `Umbraco:CMS:Global:Smtp` will be used. - -```json - "Umbraco": { - "CMS": { - "Global": { - "Smtp": { - "From": "person@umbraco.dk" - } - } - } - } -``` - -The fallback behavior also applies to the other email workflows. - -## **Send Email with Template (Razor)** - -![Send email with template]() - -Uses a template to send the results of the Form to a specified email address. - -You can create your own custom Razor templates to be used to send out emails upon Forms submission. Read more about how to create these templates in the [Email Templates](../../developer/email-templates.md) article. - -The following configuration can be set: - -* Workflow Name -* Email Template (required) - specify which template you want to use -* Header text - formatted text that will be rendered above the form entry details -* Footer text - formatted text that will be rendered below the form entry details -* Attachments - specify whether file uploads should be attached to the email -* Recipient Email (required) -* CC Email -* BCC Email -* SenderEmail -* Reply To Email -* Subject of the email (required) - -## **Send Form to URL** - -![Send to URL]() - -Sends the Form to a URL either as a HTTP POST or GET. The following configuration can be set: - -* Workflow Name -* URL (required) -* Method (required) - POST, GET, PUT or DELETE -* Standard Fields - optionally include and map standard form information such as name and page URL -* Fields - map the needed fields -* User -* Password - -When mapping fields, if any are selected, only those chosen will be sent in the request to the configured URL. If no fields are mapped, all will be sent. - -The receiving endpoint extracts form fields and values using GET for querystrings and POST for form collections. - -As an illustrative example, the following code can be used to write the posted form information to a text file: - -```csharp -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System.IO; - -namespace RequestSaver.Controllers -{ - [ApiController] - [Route("[controller]")] - public class SaveRequestController : ControllerBase - { - private const string _filePath = "c:\\temp\\request-save.txt"; - - private readonly ILogger _logger; - - public SaveRequestController(ILogger logger) - { - _logger = logger; - } - - [HttpPost] - public string Save() - { - using (StreamWriter outputFile = new StreamWriter(_filePath)) - { - foreach (var key in Request.Form.Keys) - { - outputFile.WriteLine($"{key}: {(Request.Form[key])}"); - } - } - - return "Done"; - } - } -} -``` - -## **Send XSLT Transformed Email** - -![Send XSLT Email]() - -Sends the result of the Form to an email address with full control over the email contents by providing an xslt file. The following configuration can be set: - -* Workflow Name -* XSLT File - specify which file should be used to transform the content -* Recipient Email (required) -* CC Email -* BCC Email -* SenderEmail -* Reply To Email -* Subject of the email (required) - -## **Slack** - -![Send to Slack]() - -Allows to post the Form data to a specific channel on Slack. The following configuration can be set: - -* Workflow Name -* Webhook URL (required) diff --git a/10/umbraco-forms/editor/creating-a-form/README.md b/10/umbraco-forms/editor/creating-a-form/README.md deleted file mode 100644 index 00eeef88ed7..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/README.md +++ /dev/null @@ -1,124 +0,0 @@ -# Creating a Form - The Basics - -In this article, we'll take a look at the basic steps of creating a Form and adding the Form to your Umbraco site. - -## Accessing the Forms Section - -You can manage the Forms in the **Forms** section of the Umbraco backoffice. You need to have access to the section in order to see it. - -If you do not see the **Forms** section, you might need to request access from the site Administrator. An Administrator can give permission to view the **Forms** section. This is done from within the **Users** section of the backoffice. - -![Forms Section]() - -## Creating a Form - -To create a Form, follow these steps: - -1. Navigate to the **Forms** section. -2. Click **...** next to the Forms folder. - - ![Forms tree]() -3. The **Create a new Form** dialog opens. - - ![Forms create dialog]() -4. Select **Empty Form**. The Form Designer opens in the editor. - - ![Forms designer]() -5. By default, there is a page, a fieldset, and a container available. The rest of the Form has to be added using the interface. -6. Enter the **Name** for the Form. Let's call it _Our first form_. - -
-7. **\[Optional]** Enter the **Page Name**. We'll call it _The first page_. Click **Add new page** at the bottom of the Forms designer to add more pages. - -
-8. **\[Optional]** Enter the **Group Name**. Click **Add new group** to add another group. - -
-9. Click the **Add Question** button to add a new field. - -
-10. The **Add Question** dialog opens. - - ![Forms add field dialog]() -11. Enter the following details: - - | Field Name | Value | - | ------------------ | -------------------- | - | Enter question | Name | - | Enter help text | Enter your name here | - | Choose answer type | Short answer | -12. In the **Sensitive data** field, choose if the field stores sensitive data. Once selected, the data from this field will be prevented from being downloaded and viewed by users who do not have permission to do so. Only members of the sensitive data user group will see this option of downloading. -13. Enter a **Default Value** for the field. -14. Add a **Placeholder** to make it easier for the user to fill in the Form. -15. Select if the field is **Mandatory** and customize the message. -16. Add a **Validation** to the field. There are some predefined validations available but it is possible to add your own custom validation as well. -17. Some form fields allow you to show or hide the label that's associated with the field when it is rendered within the form on the website. The default is always to show the field, but if you prefer to hide it, untick the **Show label** option. -18. Set **Conditions** for the field. For more information on Conditions, see the [Setting-up conditional logic on fields](conditional-logic.md) article. - - Some of the additional settings are dependent on which answer type was chosen. For example, since we selected _Short Answer_ as our answer type we got two additional settings (Default Value and Placeholder). -19. Once the configuration is completed, click **Submit**. You will see that the field has been added to the Form designer. - -
- -To edit a field that has already been added to the Form, click the little **cog** icon next to the field to open the dialog. To delete a field or a group, click the **Recycle Bin** icon. - -### Structuring the Form - -#### Ordering Fields - -Once you've added a few fields to your Form, you might want to change the order of questions. To do so, click **Reorder** in the top-right corner of the Form designer. - -
- -When reordering your Form, you can drag and drop the fields to make it look the way you want. Click **I am done reordering** to get back to the Form designer. - -
- -#### Form Pages - -Forms can be grouped into pages. When rendered, each page will be presented one at a time to the user. They will need to complete the first page before moving onto the second and can navigate back and forth between pages. - -You can add a new page directly to the bottom of the form via the **Add new page** button. This will appear below other pages when at least one exists. - -### Form Groups - -With a page, form fields can be arranged into groups. These will display all together on a single page but can be styled so the fields are appropriately grouped in fieldsets. - -New groups are added via the **Add new group** button. - -## Form Columns - -The last level of structure are columns that can be created within a group. To set the number of columns click the **cog** icon next to the group. You will then be able to add or move fields to the new columns created. - -## Saving the Form - -Once you are satisfied with the Form, you can save the design by clicking the **Save** button. - -## Organizing Forms in Folders - -If installation of the product is configured for storage of form definitions in the database, you will have the option to store forms within folders. If you are planning to create a number of them, this may help with organization and locating them once created for modification. - -To create a folder, access the same dialog used for creating a form. Here, you'll have the option to create a folder, for which you need to provide a name. - -You can create folders within folders, rename, move and delete them. You also have the ability to move or copy forms into folders, all via the tree operations available from the **...** menu. - -![Form save Form]() - -## Adding the Form to the Umbraco site - -To add the Form, follow these steps: - -1. Navigate to the **Content** section of the Umbraco Backoffice. -2. Select the content page where you want to insert the Form. The page you choose should either have an Rich Text Editor (RTE) field, a Grid Editor, or a form picker all of which you can add in the **Settings** section under **Document Types**. - - ![Content page]() -3. Click the **Insert macro** button in the toolbar of the RTE or Grid. The **Select Macro** dialog opens. -4. Click **Add** under **Choose a Form** and select the Form you want to insert. You will be able to select from the full list of forms. If available on your installation, you will also be able to select using a folder based view, which can be quicker to navigate when many forms have been prepared. - - ![Content page add macro]() -5. **\[Optional]** Click **Add** under **Theme** to choose which theme the Form should use. -6. Finally you have an option to **Exclude Scripts**. -7. Click **Submit**. -8. The Form is inserted on to your page. Click the **Save and publish** button. - - ![Content page with form]() diff --git a/10/umbraco-forms/editor/creating-a-form/conditional-logic.md b/10/umbraco-forms/editor/creating-a-form/conditional-logic.md deleted file mode 100644 index 53ef9c940cb..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/conditional-logic.md +++ /dev/null @@ -1,66 +0,0 @@ -# Setting-up Conditional Logic on Fields - -Sometimes you might have a field in your Form, that you want to show _only_ if the user has entered a specific value in another field. - -You can achieve this setting by using **conditional logic** on Fields. - -## Example - -Take a look at the following: - -![Example Form](images/ExampleForm.png) - -In this case, it makes sense to **only** show the email or phone field when the corresponding option is selected in the **How should we contact you?** field. - -To enable conditions for the **Email** and **Phone** fields, do the following: - -1. Click the `cog` wheel next to the **Email** and **Phone** field. The **Edit question** dialog opens. -2. Select **Enable Conditions** in the **Conditions** section. - -
-3. Enabling the condition field displays more options: - -
-4. Set the appropriate conditions and click **Submit**. - -### Action and Logic Types - -There are two **Action Types**: - -* Show: the field will be displayed if the rules match -* Hide: the field will be hidden if the rules match - -Next up, you'll need to specify the **Logic Type**. This setting is only important if you have multiple rules. - -* All: All of the rules must match -* Any: Any of the rules may match - -## Adding a new condition - -When adding a new condition, you'll need to select the field where you want to evaluate the value and can select an operator. - -In this example, we only want to show the **Phone** field if the value of the **How should we contact you** field is `Phone`. - -![Setup rule]() - -Similarly, you can display the **Email** field, if the value of the **How should we contact you** field is `Email`. You can see the conditions added to each field in the Forms designer: - -![See conditions in the Forms designer]() - -## Result - -When both the conditions have been set as shown above, this is how it will look on the frontend: - -![Frontend Example]() - -In this example, we have only selected **Phone** but it is possible to choose both _Phone_\* and **Email** and display both the fields. - -## Conditions for Pages and Fieldsets - -As well as showing or hiding a field based on conditions, you can also apply conditions to groups of fields (known as fieldsets) or to pages. The process is the same as described above. - -When applying a condition to a page, effectively you are controlling the display of the submit button (for a single-page form) or the next/previous buttons (available on multi-page forms). In this way you can ensure that the entry so far is complete before accepting it or allowing the user to move onto the next page. - -## Conditions for Dates - -You can apply conditions to dates as well as strings. When you use the date picker field, you can set a condition if a submitted date is greater/less than a specific date. diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/README.md b/10/umbraco-forms/editor/creating-a-form/fieldtypes/README.md deleted file mode 100644 index 943417d7e5d..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/fieldtypes/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Overview Of The Field Types - -Umbraco Forms comes with many default Field Types, also known as **Answer Types**. You can choose from these options when adding new fields to your Forms. - -By default, the following Field Types are available: - -* **Short Answer**: A textbox allows up to 250 characters. - - ![Textfield](images/shortanswer-v9.png) -* **Long Answer**: A bigger text field that allows multiline text and more than 250 characters. - - ![Textarea](images/longanswer-v9.png) -* [Date](date.md): Displays a picker that allows the user to select a date. - - ![Datepicker](images/date-v9.png) -* **Checkbox**: Displays a single checkbox that can be checked or not. - - ![Checkbox](images/CheckBox-v9.png) -* [File Upload](fileupload.md): Allows user to select and upload a local file. - - ![File upload](images/fileupload-v9.png) -* **Password**: Allows to type a password. The input is not visible when typing. - - ![Password field](images/password-v9.png) -* **Multiple Choice**: Displays a list of items with a checkbox for each item where the user can select multiple options. - - ![Checkboxlist](images/multiplechoice-v9.png) -* **Data Consent**: A field for the purpose of asking for data consent. By default, this field is added to all new forms created with Forms version 6+. - - ![Data Consent](images/dataconsent-v9.png) -* **Dropdown**: Displays a list of items in a drop down box where the user can select a single option. - - ![Dropdownlist](images/dropdown-v9.png) -* **Single Choice**: Displays a list of items with a radio button for each item where the user can select a single option. - - ![Single choice](images/singlechoice-v9.png) -* **Title and Description**: Displays a read-only title and description for a set of form fields. - - ![Title and description](images/titleanddescription-v9.png) -* **Rich Text**: Displays read-only formatted text that can be used to provide additional information and links within a form. - - ![Rich text](images/richtext.png) -* **Hidden**: A hidden field allows developers to include data that cannot be seen or modified by users when a Form is submitted. - - ![Hidden](images/hidden-v9.png) -* [Recaptcha V2](recaptcha2.md): The field displays a single checkbox for the user to select in order to validate the Form. - - ![reCAPTCHA v2](images/recaptcha2-v9.png) -* [Recaptcha V3 with Score](recaptcha3.md): This field returns a score for each request without user interaction. The score is based on user interactions with the site and enables you to take an appropriate action for your site based on the score. - - ![reCAPTCHA v3](images/recaptcha3-v9.png) diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/date.md b/10/umbraco-forms/editor/creating-a-form/fieldtypes/date.md deleted file mode 100644 index 45f523966fb..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/fieldtypes/date.md +++ /dev/null @@ -1,31 +0,0 @@ -# Date - -The date picker uses a front-end library called [Pikaday](https://github.com/dbushell/Pikaday) to display a UI to pick dates. - -![Date picker on frontend](images/date-picker.png) - -Pikaday date picker can be localised based on the page the Form is rendered on. - -The date picker displays the picked date in the required locale. Using JavaScript, a hidden field is updated with a standard date format to send to the server for storing record submissions. This avoids the locale mixing up the dates. - -To achieve localized date, a Razor partial view is included at `/Views/Partials/Forms/Themes/default/DatePicker.cshtml`. - -The **DatePicker.cshtml** includes the `moment-with-locales.min.js` library to help with the date locale formatting and the appropriate changes to Pikaday to support the locales. If you wish to use a different DatePicker component, edit the **DatePicker.cshtml** file as per your needs. - -## Configure the Year range - -The Date picker has a configuration setting to control the number of years shown in the picker. The default value is 10 years. - -You can configure the settings in the `appSettings.json` file: - -```json - "Forms": { - "FieldTypes": { - "DatePicker": { - "DatePickerYearRange": 10 - } - } - } -``` - -Update `DatePickerYearRange` to a higher number (for example: 100) to increase the numbers of years available in the Date picker. diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/fileupload.md b/10/umbraco-forms/editor/creating-a-form/fieldtypes/fileupload.md deleted file mode 100644 index 9781bae9780..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/fieldtypes/fileupload.md +++ /dev/null @@ -1,29 +0,0 @@ -# File Upload - -The File Upload field allows the users to upload a file along with the Form on your website. - -In this article, you will find details about the configuration options you have for the File Upload field. - -![fileupload](images/fileupload-types.png) - -## Predefined allowed File Types - -You can choose to specify which files you want to allow the user to upload, when accessing the Form. - -To allow only specific files: - -1. Select the File Type checkbox the user should be able to upload. -2. Click **Submit**. - -{% hint style="info" %} -We recommend selecting **Allow only specified files**, to limit malicious code to be uploaded, whenever the user is submitting the Form. -{% endhint %} - -## User Defined Allowed File Types - -If the list of predefined file types do not include a specific file type, you can add additional ones. - -To add new file type: - -1. Type a file extension name in the **User defined allowed file types** field and click add. -2. Click **Submit**. diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/CheckBox-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/CheckBox-v9.png deleted file mode 100644 index b25bb9e7981..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/CheckBox-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/CheckBox.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/CheckBox.png deleted file mode 100644 index 83e772f6d8f..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/CheckBox.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dataconsent-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dataconsent-v9.png deleted file mode 100644 index 5593e50daed..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dataconsent-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dataconsent.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dataconsent.png deleted file mode 100644 index 6212b9aaa08..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dataconsent.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date-picker.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date-picker.png deleted file mode 100644 index 88438cf1128..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date-picker.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date-v9.png deleted file mode 100644 index a7120c5bd61..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date.PNG deleted file mode 100644 index 29b4381bcbb..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/date.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dropdown-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dropdown-v9.png deleted file mode 100644 index 449893930f3..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dropdown-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dropdown.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dropdown.PNG deleted file mode 100644 index 6e91b9d23f6..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/dropdown.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload-types.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload-types.png deleted file mode 100644 index f00c05c4fc2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload-types.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload-v9.png deleted file mode 100644 index 4e60329f2fc..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload.png deleted file mode 100644 index f80a306f364..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/fileupload.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/hidden-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/hidden-v9.png deleted file mode 100644 index 5ab1c600a3e..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/hidden-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/hidden.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/hidden.PNG deleted file mode 100644 index bc9f9ce9fa1..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/hidden.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/longanswer-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/longanswer-v9.png deleted file mode 100644 index 9980b404ede..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/longanswer-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/longanswer.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/longanswer.PNG deleted file mode 100644 index 077b1b2c7dc..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/longanswer.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/multiplechoice-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/multiplechoice-v9.png deleted file mode 100644 index d1a37cedf1c..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/multiplechoice-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/multiplechoice.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/multiplechoice.PNG deleted file mode 100644 index 8d3344212e7..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/multiplechoice.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/password-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/password-v9.png deleted file mode 100644 index c771733f6f7..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/password-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/password.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/password.PNG deleted file mode 100644 index 6ed6590fd8d..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/password.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha2-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha2-v9.png deleted file mode 100644 index c5de9019855..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha2-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha2.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha2.png deleted file mode 100644 index 2ae28bcf014..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha2.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha3-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha3-v9.png deleted file mode 100644 index 41d9316ede4..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/recaptcha3-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/richtext.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/richtext.png deleted file mode 100644 index da89d3394cc..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/richtext.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/shortanswer-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/shortanswer-v9.png deleted file mode 100644 index 6e504b4aa61..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/shortanswer-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/shortanswer.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/shortanswer.PNG deleted file mode 100644 index bf130226f3b..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/shortanswer.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/singlechoice-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/singlechoice-v9.png deleted file mode 100644 index f175439fd32..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/singlechoice-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/singlechoice.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/singlechoice.PNG deleted file mode 100644 index 589dbd4d563..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/singlechoice.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/titleanddescription-v9.png b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/titleanddescription-v9.png deleted file mode 100644 index 1260f8cb9d2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/titleanddescription-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/titleanddescription.PNG b/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/titleanddescription.PNG deleted file mode 100644 index 02c2187853d..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/fieldtypes/images/titleanddescription.PNG and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/recaptcha2.md b/10/umbraco-forms/editor/creating-a-form/fieldtypes/recaptcha2.md deleted file mode 100644 index 6ee355bd82d..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/fieldtypes/recaptcha2.md +++ /dev/null @@ -1,28 +0,0 @@ -# reCAPTCHA V2 - -In Umbraco Forms, reCAPTCHA V2 comes out of the box to help you to protect your site from spam, malicious people, and so on. - -## Enabling reCAPTCHA V2 - -Follow these steps to enable reCAPTCHA V2 in Umbraco Forms: - -1. Go to the **Forms** section in the backoffice. -2. Find the form that should have **ReCAPTCHA v2** enabled. -3. Add a new question and select **ReCAPTCHA v2** as its answer type. -4. Make sure the field is set as **Mandatory**. -5. Configure ReCAPTCHA settings in the `appSettings.json` file to include public and private keys: - -```json -"Umbraco"{ - "Forms": { - "FieldTypes": { - "Recaptcha2": { - "PublicKey": "", - "PrivateKey": "" - } - } - } - } -``` - -You can create your keys by logging into your [reCAPTCHA account](https://www.google.com/recaptcha/). diff --git a/10/umbraco-forms/editor/creating-a-form/fieldtypes/recaptcha3.md b/10/umbraco-forms/editor/creating-a-form/fieldtypes/recaptcha3.md deleted file mode 100644 index e8d23ca9bc4..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/fieldtypes/recaptcha3.md +++ /dev/null @@ -1,30 +0,0 @@ -# reCAPTCHA V3 - -In Umbraco Forms, reCAPTCHA V3 comes out of the box. - -reCAPTCHA v3 allows you to verify if an interaction is legitimate without any user interaction. - -## Enabling reCAPTCHA V3 - -Follow these steps to enable reCAPTCHA V3 in Umbraco Forms: - -1. Go to the **Forms** section in the backoffice. -2. Find the form that should have **ReCAPTCHA v3** enabled. -3. Add a new question and select **ReCAPTCHA v3 with Score** as its answer type. -4. Make sure the field is set as **Mandatory**. -5. Configure ReCAPTCHA settings in the `appSettings.json` file to include public and private keys: - -```json -"Umbraco"{ - "Forms": { - "FieldTypes": { - "Recaptcha3": { - "SiteKey": "", - "PrivateKey": "" - } - } - } - } -``` - -You can create your keys by logging into your [reCAPTCHA account](https://www.google.com/recaptcha/). diff --git a/10/umbraco-forms/editor/creating-a-form/form-settings.md b/10/umbraco-forms/editor/creating-a-form/form-settings.md deleted file mode 100644 index 966dd573a6a..00000000000 --- a/10/umbraco-forms/editor/creating-a-form/form-settings.md +++ /dev/null @@ -1,80 +0,0 @@ -# Form Settings - -In this article, you will find information about accessing the Forms Settings and the validations available to customize your Form. - -To access the Form Settings: - -1. Navigate to the **Forms** section. -2. Open a Form you wish to customize. -3. Click **Settings** in the top-right corner of the screen. - - ![Form settings dialog]() - -## Settings Options - -The following options are available in Forms Settings: - -### Store Records - -By default, all submitted records are saved in the database. This option allows you to view and export the saved records from the queries overview. If you do not want to store data (due to policies in your organization), you can uncheck the box. - -Disabling this option will prevent database records from being stored, but any file uploads made as part of the form submission will still be retained. If you do not want the files to be stored, ensure that any process or method used to process, move, or copy them to a different location also removes the file. - -![Form settings Store Records]() - -### Captions - -Customize the labels of the **Submit**, **Next**, and **Previous** buttons used in your Form. - -![Form settings stylesheet]() - -### Styling - -Set a stylesheet to give your Form custom styling. You have an option to disable the default styling. Enabling the **Disable default stylesheet** option will prevent a default stylesheet to be added to the pages where the Form is placed. - -![Form settings stylesheet]() - -### Validation - -Define a message that is displayed when a field is mandatory, when a value is not supplied, or when the value is invalid. - -![Form settings validation]() - -The following Validations are available: - -| Validation Type | Description | -| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Mandatory error message** | The error message is displayed for a field that is marked as mandatory but a value has not been provided upon submission. This setting can be overwritten on a field level - `{0}` will be replaced with the field caption. | -| **Invalid error message** | The error message is displayed for a field if the value provided is not valid (a regular expression has been setup but the input does not match). This setting can be overwritten on a field level - `{0}` will be replaced with the field caption. | -| **Show validation summary** | Enable this option if you wish to display a summary of all the error messages on top of the Form. | -| **Hide field validation labels** | Enable this option if you wish to hide individual field error messages from being displayed. | -| **Mark fields** | You can choose to not mark any fields or only mark mandatory or optional fields. | -| **Indicator** | Choose which indicator to use when a field has been marked as mandatory. The default indicator is `*` | - -### Autocomplete - -The autocomplete setting for the overall form can be changed from the default of "None" to "On" or "Off". Setting this explicitly will control how the browser offers automatic prompts to the user when completing the form. - -![Form settings Autocomplete](../../../../13/umbraco-forms/.gitbook/assets/FormSettingsAutocomplete.png) - -### Moderation - -Enabling this feature allows the moderator to manage the approval status of a form. This can be used in a number of scenarios. For example, if the form submission will be publicly shown, you can control which are published. - -![Form settings Moderation]() - -### Fields displayed - -By default, a constant set of fields are displayed when form entries are shown in a list. You will see the first three fields in the form, plus some system information like the record state and the date it was created. - -To customize this, turn off the "Display default fields" option and select the ones you wish to display. - -

Forms Settings Fields Displayed

- -### Date retentions - -To help protect site visitor privacy, rules can be configured in this section for the automatic deletion of submissions. You can set how long to retain records for each state (submitted or approved). - -A background service that carries out the actual removal of records needs to be [enabled in configuration](../../developer/configuration/#scheduledrecorddeletion). If that is not running, a notification will be displayed. - -

Form Settings Date Retention

diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentExampleMacroButton.png b/10/umbraco-forms/editor/creating-a-form/images/ContentExampleMacroButton.png deleted file mode 100644 index 6eb9af9ba2a..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentExampleMacroButton.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentExamples (1).png b/10/umbraco-forms/editor/creating-a-form/images/ContentExamples (1).png deleted file mode 100644 index 4788a8051cb..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentExamples (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentExamples.png b/10/umbraco-forms/editor/creating-a-form/images/ContentExamples.png deleted file mode 100644 index 4788a8051cb..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentExamples.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentExamplesWithForm (1).png b/10/umbraco-forms/editor/creating-a-form/images/ContentExamplesWithForm (1).png deleted file mode 100644 index fbfac9ec1e2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentExamplesWithForm (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentExamplesWithForm.png b/10/umbraco-forms/editor/creating-a-form/images/ContentExamplesWithForm.png deleted file mode 100644 index fbfac9ec1e2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentExamplesWithForm.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentPage.png b/10/umbraco-forms/editor/creating-a-form/images/ContentPage.png deleted file mode 100644 index 4f69f96fbb9..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentPage.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialog (1).png b/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialog (1).png deleted file mode 100644 index 768d74786e2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialog (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialog.png b/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialog.png deleted file mode 100644 index 768d74786e2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialog.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialogChooseForm.png b/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialogChooseForm.png deleted file mode 100644 index 0e7d474a735..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentPageAddMacroDialogChooseForm.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentPageMacroButton.png b/10/umbraco-forms/editor/creating-a-form/images/ContentPageMacroButton.png deleted file mode 100644 index 4b246d8300e..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentPageMacroButton.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ContentPageWithForm.png b/10/umbraco-forms/editor/creating-a-form/images/ContentPageWithForm.png deleted file mode 100644 index 20367d97c3a..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ContentPageWithForm.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/EnableConditions-v9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/EnableConditions-v9 (1).png deleted file mode 100644 index c966c9dd1b5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/EnableConditions-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/EnableConditions-v9.png b/10/umbraco-forms/editor/creating-a-form/images/EnableConditions-v9.png deleted file mode 100644 index c966c9dd1b5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/EnableConditions-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/EnableConditions.png b/10/umbraco-forms/editor/creating-a-form/images/EnableConditions.png deleted file mode 100644 index 6b340b94d29..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/EnableConditions.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ExampleForm (1).png b/10/umbraco-forms/editor/creating-a-form/images/ExampleForm (1).png deleted file mode 100644 index ff0f3e4d85f..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ExampleForm (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/ExampleForm.png b/10/umbraco-forms/editor/creating-a-form/images/ExampleForm.png deleted file mode 100644 index ff0f3e4d85f..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/ExampleForm.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddField.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddField.png deleted file mode 100644 index 8b0e1300dcd..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddField.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialog.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialog.png deleted file mode 100644 index 98dccacddfb..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialog.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialogV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialogV8 (1).png deleted file mode 100644 index a3496f28f83..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialogV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialogV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialogV8.png deleted file mode 100644 index a3496f28f83..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldDialogV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldV8 (1).png deleted file mode 100644 index e299ae2e4c7..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldV8.png deleted file mode 100644 index e299ae2e4c7..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerAddFieldV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAdded.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAdded.png deleted file mode 100644 index 295eea6fb2e..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAdded.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAddedV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAddedV8 (1).png deleted file mode 100644 index dec6a524c71..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAddedV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAddedV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAddedV8.png deleted file mode 100644 index dec6a524c71..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFieldAddedV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormName.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormName.png deleted file mode 100644 index 44b3416ea87..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormName.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormNameV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormNameV8 (1).png deleted file mode 100644 index d6309410183..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormNameV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormNameV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormNameV8.png deleted file mode 100644 index d6309410183..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerFormNameV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaption.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaption.png deleted file mode 100644 index 86f6b8c0da9..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaption.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaptionV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaptionV8 (1).png deleted file mode 100644 index d3949955585..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaptionV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaptionV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaptionV8.png deleted file mode 100644 index d3949955585..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageCaptionV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroup.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroup.png deleted file mode 100644 index 21e7a5cfedb..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroup.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroupV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroupV8 (1).png deleted file mode 100644 index 60b9ba0ec4c..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroupV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroupV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroupV8.png deleted file mode 100644 index 60b9ba0ec4c..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerPageGroupV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSave.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSave.png deleted file mode 100644 index 9f7d175686c..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSave.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSaveV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSaveV8 (1).png deleted file mode 100644 index 65ba8981085..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSaveV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSaveV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSaveV8.png deleted file mode 100644 index 65ba8981085..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSaveV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSetFieldCaption.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSetFieldCaption.png deleted file mode 100644 index cccb58ed6fc..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerSetFieldCaption.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStart.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStart.png deleted file mode 100644 index 1c8c630ba2b..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStart.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStartV8 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStartV8 (1).png deleted file mode 100644 index c2d410cc4b8..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStartV8 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStartV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStartV8.png deleted file mode 100644 index c2d410cc4b8..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormDesignerStartV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettings (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormSettings (1).png deleted file mode 100644 index 75869b154b9..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettings (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettings.png b/10/umbraco-forms/editor/creating-a-form/images/FormSettings.png deleted file mode 100644 index 75869b154b9..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettings.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions-v9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions-v9 (1).png deleted file mode 100644 index 47d983ac098..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions-v9.png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions-v9.png deleted file mode 100644 index 47d983ac098..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions.png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions.png deleted file mode 100644 index 78aa8931291..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsCaptions.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsModeration (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsModeration (1).png deleted file mode 100644 index 02deafec93d..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsModeration (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsModeration.png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsModeration.png deleted file mode 100644 index 02deafec93d..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsModeration.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsStyling (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsStyling (1).png deleted file mode 100644 index 450a2a8ace6..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsStyling (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsStyling.png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsStyling.png deleted file mode 100644 index 450a2a8ace6..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsStyling.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsValidation (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsValidation (1).png deleted file mode 100644 index ed70a24c4af..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsValidation (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsValidation.png b/10/umbraco-forms/editor/creating-a-form/images/FormSettingsValidation.png deleted file mode 100644 index ed70a24c4af..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormSettingsValidation.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialog.png b/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialog.png deleted file mode 100644 index 147cb920f8d..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialog.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV8.png deleted file mode 100644 index ed694743220..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV9 (1).png deleted file mode 100644 index b607cfdfedc..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV9.png b/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV9.png deleted file mode 100644 index b607cfdfedc..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsCreateDialogV9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsFieldSettings.gif b/10/umbraco-forms/editor/creating-a-form/images/FormsFieldSettings.gif deleted file mode 100644 index eee91a2c3f2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsFieldSettings.gif and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsSection.png b/10/umbraco-forms/editor/creating-a-form/images/FormsSection.png deleted file mode 100644 index 388839d192e..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsSection.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV8.png b/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV8.png deleted file mode 100644 index d10b6854700..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV8.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV9 (1).png deleted file mode 100644 index ff9731388e2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV9.png b/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV9.png deleted file mode 100644 index ff9731388e2..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsSectionV9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsTree (1).png b/10/umbraco-forms/editor/creating-a-form/images/FormsTree (1).png deleted file mode 100644 index 83c8153e016..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsTree (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/FormsTree.png b/10/umbraco-forms/editor/creating-a-form/images/FormsTree.png deleted file mode 100644 index 83c8153e016..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/FormsTree.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form (1).png b/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form (1).png deleted file mode 100644 index 46d08a18cce..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form.png b/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form.png deleted file mode 100644 index 46d08a18cce..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form_1 (1).png b/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form_1 (1).png deleted file mode 100644 index ca5c608127b..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form_1 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form_1.png b/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form_1.png deleted file mode 100644 index ca5c608127b..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/Reorder_Form_1.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/Store-Records (1).png b/10/umbraco-forms/editor/creating-a-form/images/Store-Records (1).png deleted file mode 100644 index 4c6b7287dd5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/Store-Records (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/Store-Records.png b/10/umbraco-forms/editor/creating-a-form/images/Store-Records.png deleted file mode 100644 index 4c6b7287dd5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/Store-Records.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/conditions-v9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/conditions-v9 (1).png deleted file mode 100644 index 894fa43a1c5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/conditions-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/conditions-v9.png b/10/umbraco-forms/editor/creating-a-form/images/conditions-v9.png deleted file mode 100644 index 894fa43a1c5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/conditions-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/conditions.png b/10/umbraco-forms/editor/creating-a-form/images/conditions.png deleted file mode 100644 index 6fa49f4e76d..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/conditions.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/email.png b/10/umbraco-forms/editor/creating-a-form/images/email.png deleted file mode 100644 index bf8baf3211b..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/email.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice-v9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice-v9 (1).png deleted file mode 100644 index 2a1c0a8d0d5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice-v9.png b/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice-v9.png deleted file mode 100644 index 2a1c0a8d0d5..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice.png b/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice.png deleted file mode 100644 index 9e2798b2350..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleBackoffice.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleConditions.png b/10/umbraco-forms/editor/creating-a-form/images/exampleConditions.png deleted file mode 100644 index 47720a8a894..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleConditions.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend-v9 (1).png b/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend-v9 (1).png deleted file mode 100644 index 1d31ab79570..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend-v9.png b/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend-v9.png deleted file mode 100644 index 1d31ab79570..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend.png b/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend.png deleted file mode 100644 index e400cd61780..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/exampleFrontend.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/frontend-email.png b/10/umbraco-forms/editor/creating-a-form/images/frontend-email.png deleted file mode 100644 index 1a30fbcdc0c..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/frontend-email.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/frontend-phone.png b/10/umbraco-forms/editor/creating-a-form/images/frontend-phone.png deleted file mode 100644 index 662b35cec7a..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/frontend-phone.png and /dev/null differ diff --git a/10/umbraco-forms/editor/creating-a-form/images/phone.png b/10/umbraco-forms/editor/creating-a-form/images/phone.png deleted file mode 100644 index 77cc3f9a414..00000000000 Binary files a/10/umbraco-forms/editor/creating-a-form/images/phone.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/README.md b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/README.md deleted file mode 100644 index 73246c8d6e8..00000000000 --- a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Defining And Attaching Prevalue Sources - -Prevalue sources are a way to pre-define and/or retrieve a list of items from a certain source. They can be added in any field types that include some kind of list like Dropdown and Multiple/Single Choice lists. - -## Setting up a Prevalue Source - -Prevalue sources can be managed in the **Prevalue sources** folder available in the **Forms** section. - -![Prevalue source tree](images/prevaluesourcetree.png) - -To set a prevalue source: - -1. Navigate to the **Forms** section. -2. Right-click the **Prevalue sources** folder and select **Create**. -3. A new page opens in the right-side of the editor where you'll need to setup and configure your prevalue source. -4. Enter a **Name**. -5. Select the type of prevalue source from the **Type** drop-down. For more information on the different default types, see the [Overview of the Prevalue Source Types](prevalue-source-types.md) article. - - ![Choose type](images/choosetype.png) - -### Configuring the Prevalue Source - -Depending on the **Type** you choose, you'll need to provide some additional settings: - -1. In this walk-through, we will select **Get values from textfile** from the **Type** drop-down. ![Type settings](images/typesettings.png) -2. Now, provide a file containing the list to use as prevalues. For example: A `.txt` file containing the following values: - - ``` - example value 1 - example value 2 - example value 3 - example value 4 - example value 5 - ``` -3. Select **Pick File** and choose the text file you created. -4. Once the text file is uploaded, click **Save** to save the prevalue source. -5. If the file is successfully uploaded and validated, you will see an overview of the values in a tabular format. - -
- -If you would like to have different values presented to your users from the value stored, you can provide two values per line, separated with a vertical bar (|), e.g.: - -``` -1|example value 1 -2|example value 2 -3|example value 3 -4|example value 4 -5|example value 5 -``` - -In this case the user would pick from a list showing the captions, but the single integer values would be stored with the record. - -This can be useful if the recorded entries are used in any subsequent workflows or business processes, where particular values, that aren't appropriate for the user to select from, are required. - -![Prevalues with captions](images/Prevalues-with-caption.png) - -### Defining Cache Options for the Prevalue Source - -Sometimes retrieving the list of options for a prevalue source can be an expensive operation. If the source depends on data from external systems, it could be that the list changes regularly or rarely. - -Given the variation here, we allow you to select an appropriate level of caching for the list of options. - -You can choose between: - -* `No Caching` - no caching will be applied and the list of options will be retrieved from source on every request. You will likely only want to choose this option if the information changes frequently and it's important that the latest is presented to website visitors. -* `Cache For Specified Time` - the list will be cached for the period of time provided. -* `Cache With No Expiry` - the list will be cached on first request and not retrieved again until either the prevalue source is edited or the website is restarted. This is most appropriate to use for information held within the prevalue source data itself (such as when uploading a text file). - -![Prevalue cache options](images/prevalue-cache-options.png) - -## Attaching a Prevalue Source to a Field - -Once a prevalue source has been created, it can be used while building Forms in the Forms designer. - -**Example:** Let's add a Multiple Choice field type in our Form. - -If there is at least one prevalue source defined in the project, the Prevalues source will contain a dropdown from where you can choose the predefined value. - -![Prevalue source](images/FieldPrevalueSource.png) - -Once you have selected the prevalue source, the values are rendered in the Forms designer from the attached source. - -![Preview](images/fieldpreview.png) diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/FieldPrevalueSource.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/FieldPrevalueSource.png deleted file mode 100644 index c1293a4a9ae..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/FieldPrevalueSource.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/Prevalues-with-caption.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/Prevalues-with-caption.png deleted file mode 100644 index 7e0a79b21b1..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/Prevalues-with-caption.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/choosetype.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/choosetype.png deleted file mode 100644 index 3ed6b97bb94..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/choosetype.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/datatype-prevalues.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/datatype-prevalues.png deleted file mode 100644 index 4e0dd7513ce..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/datatype-prevalues.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/docs-from-xpath.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/docs-from-xpath.png deleted file mode 100644 index 05a0b020f3f..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/docs-from-xpath.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/fieldpreview.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/fieldpreview.png deleted file mode 100644 index ba1e9aeac2f..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/fieldpreview.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/prevalue-cache-options.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/prevalue-cache-options.png deleted file mode 100644 index d030dd94fd4..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/prevalue-cache-options.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/prevaluesourcetree.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/prevaluesourcetree.png deleted file mode 100644 index bb90fa4e7d3..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/prevaluesourcetree.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/preview.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/preview.png deleted file mode 100644 index 3fca5d00d48..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/preview.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/typesettings.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/typesettings.png deleted file mode 100644 index 8281c10fab2..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/typesettings.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/umbraco-documents-v9.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/umbraco-documents-v9.png deleted file mode 100644 index 2f769c15c47..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/umbraco-documents-v9.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/umbraco-documents.png b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/umbraco-documents.png deleted file mode 100644 index ec43727e01e..00000000000 Binary files a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/images/umbraco-documents.png and /dev/null differ diff --git a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/prevalue-source-types.md b/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/prevalue-source-types.md deleted file mode 100644 index e52b2e48df6..00000000000 --- a/10/umbraco-forms/editor/defining-and-attaching-prevaluesources/prevalue-source-types.md +++ /dev/null @@ -1,41 +0,0 @@ -# Prevalue Source Types Overview - -There are some default prevalue source types that can be used. - -Here is a quick overview of them: - -* **Get values from textfile** - - Upload a textfile that contains the prevalues. Each prevalue should have its own line in the file. Once the file has been uploaded, you can find it in `~/wwwroot/App_Data/UmbracoForms/Data/PreValueTextFiles/{GUID}` where the `{GUID}`is replaced with the pre-value ID. -* **Umbraco Documents** - - Allows to use content nodes from a specific source as prevalues. You can define the root node by either - - * Choosing a node directly from the Content tree or - * Using XPath - - ![Umbraco Documents as prevalue sources](images/umbraco-documents-v9.png) - - Additional settings can be applied: - - * Select **Use current page as root** instead of choosing a specific root node. _The preview is not available when this setting is enabled._ - * Select a specific **Document type**, if the selected root node contains a different Document Type. - * Select to include **Grand children** of the selected root node. -* **SQL Database** - - Connect to a OleDB compatible database table and construct a prevalue source from it. Once selected, it will be editable from the Forms interface. - - The following configurations need to be set: - - * Connection string (either choose one from your web.config or add another from a textfield) - * Connection String from configuration - * Table Name - * Key Column - * Value Column -* **Umbraco Data Type Prevalues** - - Choose an Umbraco Data Type to use its configured prevalue collection. - - In the example below, the prevalue collection from a Data Type called `Home - Font - Radio button` is used: - - ![Data Type prevalues](images/datatype-prevalues.png) diff --git a/10/umbraco-forms/editor/images/BulkActions (1).png b/10/umbraco-forms/editor/images/BulkActions (1).png deleted file mode 100644 index dfb879546e9..00000000000 Binary files a/10/umbraco-forms/editor/images/BulkActions (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/BulkActions.png b/10/umbraco-forms/editor/images/BulkActions.png deleted file mode 100644 index dfb879546e9..00000000000 Binary files a/10/umbraco-forms/editor/images/BulkActions.png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/EntriesViewer (1).png b/10/umbraco-forms/editor/images/EntriesViewer (1).png deleted file mode 100644 index fe077a4161f..00000000000 Binary files a/10/umbraco-forms/editor/images/EntriesViewer (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/EntriesViewer.png b/10/umbraco-forms/editor/images/EntriesViewer.png deleted file mode 100644 index fe077a4161f..00000000000 Binary files a/10/umbraco-forms/editor/images/EntriesViewer.png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/Export (1).png b/10/umbraco-forms/editor/images/Export (1).png deleted file mode 100644 index 9ba199defea..00000000000 Binary files a/10/umbraco-forms/editor/images/Export (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/Export.png b/10/umbraco-forms/editor/images/Export.png deleted file mode 100644 index 9ba199defea..00000000000 Binary files a/10/umbraco-forms/editor/images/Export.png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/ExportAllDialog (1).png b/10/umbraco-forms/editor/images/ExportAllDialog (1).png deleted file mode 100644 index 09bf4519314..00000000000 Binary files a/10/umbraco-forms/editor/images/ExportAllDialog (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/ExportAllDialog.png b/10/umbraco-forms/editor/images/ExportAllDialog.png deleted file mode 100644 index 09bf4519314..00000000000 Binary files a/10/umbraco-forms/editor/images/ExportAllDialog.png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/Filter (1).png b/10/umbraco-forms/editor/images/Filter (1).png deleted file mode 100644 index 36dbbd65dd6..00000000000 Binary files a/10/umbraco-forms/editor/images/Filter (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/Filter.png b/10/umbraco-forms/editor/images/Filter.png deleted file mode 100644 index 36dbbd65dd6..00000000000 Binary files a/10/umbraco-forms/editor/images/Filter.png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/tree (1).png b/10/umbraco-forms/editor/images/tree (1).png deleted file mode 100644 index 37918780188..00000000000 Binary files a/10/umbraco-forms/editor/images/tree (1).png and /dev/null differ diff --git a/10/umbraco-forms/editor/images/tree.png b/10/umbraco-forms/editor/images/tree.png deleted file mode 100644 index 37918780188..00000000000 Binary files a/10/umbraco-forms/editor/images/tree.png and /dev/null differ diff --git a/10/umbraco-forms/editor/viewing-and-exporting-entries.md b/10/umbraco-forms/editor/viewing-and-exporting-entries.md deleted file mode 100644 index 5694b14a6b5..00000000000 --- a/10/umbraco-forms/editor/viewing-and-exporting-entries.md +++ /dev/null @@ -1,56 +0,0 @@ -# Viewing And Exporting Entries - -Expand the Form in the tree to view the Entries for each Form. - -![Tree]() - -## Entries Overview - -When accessing the Entries viewer, you will be able to see all the entries submitted via the Form. - -![Entries viewer]() - -### Viewing the Entries - -By default, the list is filtered to show entries only from the past month. If you want to change the date range, pick the appropriate time period from the date picker. You can also filter the entries by specific words using the Search field on the left. - -Clicking on the first field for each record in the list will open the full set of information recorded for the form entry. Next and previous buttons allow you to navigate through the entry list. - -![Filter](images/Filter.png) - -### Editing the Entries - -If configured via the permissions model and supported by the version of Umbraco Forms you are running, entries may be editable via the backoffice. If available, click the _Edit_ button to switch the read-only view of an entry to an editable one and _Save_ to record the changes. An audit trail will show who and when updates on the entry were made. - -Validation will operate as is configured for the form in terms of mandatory fields and those that must match a particular pattern. Conditional display of fields is not supported. - -## Exporting Entries - -To export all the entries from your Form: - -1. Go to the **Forms** section. -2. Navigate to the **Entries** you wish to export. -3. Click **Export** in the top-right corner of the screen. - -
-4. The Export dialog opens. Choose a format such as Microsoft Excel to export the Form records to. - -
-5. Click **Done**. - -If you have fields that allow the user to upload files within your form, you will also have the option to download a zip file containing these files. You can either download the files in the structure that they are stored on the web server's disk. Or you can download them organised by entry, so it's easier to match up the entry listed in the spreadsheet download with the uploaded file(s). - -## Record Actions - -When selecting entries, it is possible to execute Actions. To select an entry, click anywhere on the entry. - -{% hint style="info" %} -Clicking on the _Name_ opens a view where you can see the entire entry details. -{% endhint %} - -![Record bulk actions]() - -Select at least 1 record to see the available actions in the top-right corner. By default, there are 2 possible actions: - -* Approve -* Delete diff --git a/10/umbraco-forms/installation/images/Forms_Section_Backoffice (1).png b/10/umbraco-forms/installation/images/Forms_Section_Backoffice (1).png deleted file mode 100644 index 9ed7bf7f936..00000000000 Binary files a/10/umbraco-forms/installation/images/Forms_Section_Backoffice (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/Forms_Section_Backoffice.png b/10/umbraco-forms/installation/images/Forms_Section_Backoffice.png deleted file mode 100644 index 9ed7bf7f936..00000000000 Binary files a/10/umbraco-forms/installation/images/Forms_Section_Backoffice.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/InstallingForms.gif b/10/umbraco-forms/installation/images/InstallingForms.gif deleted file mode 100644 index 59643bd9c02..00000000000 Binary files a/10/umbraco-forms/installation/images/InstallingForms.gif and /dev/null differ diff --git a/10/umbraco-forms/installation/images/Manage_packages (1).png b/10/umbraco-forms/installation/images/Manage_packages (1).png deleted file mode 100644 index 53774af554b..00000000000 Binary files a/10/umbraco-forms/installation/images/Manage_packages (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/Manage_packages.png b/10/umbraco-forms/installation/images/Manage_packages.png deleted file mode 100644 index 53774af554b..00000000000 Binary files a/10/umbraco-forms/installation/images/Manage_packages.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/Manage_packages_v10 (1).png b/10/umbraco-forms/installation/images/Manage_packages_v10 (1).png deleted file mode 100644 index c47a0ecf652..00000000000 Binary files a/10/umbraco-forms/installation/images/Manage_packages_v10 (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/Manage_packages_v10 (2).png b/10/umbraco-forms/installation/images/Manage_packages_v10 (2).png deleted file mode 100644 index c47a0ecf652..00000000000 Binary files a/10/umbraco-forms/installation/images/Manage_packages_v10 (2).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/Manage_packages_v10.png b/10/umbraco-forms/installation/images/Manage_packages_v10.png deleted file mode 100644 index c47a0ecf652..00000000000 Binary files a/10/umbraco-forms/installation/images/Manage_packages_v10.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeAvailable (1).png b/10/umbraco-forms/installation/images/UpgradeAvailable (1).png deleted file mode 100644 index 6a24cc30737..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeAvailable (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeAvailable (2).png b/10/umbraco-forms/installation/images/UpgradeAvailable (2).png deleted file mode 100644 index 6a24cc30737..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeAvailable (2).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeAvailable.png b/10/umbraco-forms/installation/images/UpgradeAvailable.png deleted file mode 100644 index 6a24cc30737..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeAvailable.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeNow (1).png b/10/umbraco-forms/installation/images/UpgradeNow (1).png deleted file mode 100644 index 92a5d752e00..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeNow (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeNow (2).png b/10/umbraco-forms/installation/images/UpgradeNow (2).png deleted file mode 100644 index 92a5d752e00..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeNow (2).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeNow.png b/10/umbraco-forms/installation/images/UpgradeNow.png deleted file mode 100644 index 92a5d752e00..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeNow.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeProgress (1).png b/10/umbraco-forms/installation/images/UpgradeProgress (1).png deleted file mode 100644 index 3d092da8972..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeProgress (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeProgress (2).png b/10/umbraco-forms/installation/images/UpgradeProgress (2).png deleted file mode 100644 index 3d092da8972..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeProgress (2).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/UpgradeProgress.png b/10/umbraco-forms/installation/images/UpgradeProgress.png deleted file mode 100644 index 3d092da8972..00000000000 Binary files a/10/umbraco-forms/installation/images/UpgradeProgress.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/buy-license.png b/10/umbraco-forms/installation/images/buy-license.png deleted file mode 100644 index 29655a7bf20..00000000000 Binary files a/10/umbraco-forms/installation/images/buy-license.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/start-with-forms-v9 (1).png b/10/umbraco-forms/installation/images/start-with-forms-v9 (1).png deleted file mode 100644 index e8ff764e518..00000000000 Binary files a/10/umbraco-forms/installation/images/start-with-forms-v9 (1).png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/start-with-forms-v9.png b/10/umbraco-forms/installation/images/start-with-forms-v9.png deleted file mode 100644 index e8ff764e518..00000000000 Binary files a/10/umbraco-forms/installation/images/start-with-forms-v9.png and /dev/null differ diff --git a/10/umbraco-forms/installation/images/start-with-forms.png b/10/umbraco-forms/installation/images/start-with-forms.png deleted file mode 100644 index eafcd021e58..00000000000 Binary files a/10/umbraco-forms/installation/images/start-with-forms.png and /dev/null differ diff --git a/10/umbraco-forms/installation/install.md b/10/umbraco-forms/installation/install.md deleted file mode 100644 index f331fdf59f8..00000000000 --- a/10/umbraco-forms/installation/install.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -meta.Title: Installing Umbraco Forms -description: Installing Umbraco Forms ---- - -# Installing Umbraco Forms - -Umbraco contains the **Forms** section, by default. You will see a similar interface, when you click on the **Forms** section in the **Umbraco Backoffice**. - -![Form section in backoffice](images/Forms\_Section\_Backoffice.png) - -## Video Tutorial - -{% embed url="https://www.youtube.com/watch?v=3Aojbp_1MPc" %} - -To install the Umbraco Forms package (**Umbraco.Forms**), follow these steps: - -1. Identify the Umbraco CMS version your project is running. -2. Find a compatible version of Umbraco Forms that matches your Umbraco CMS version. A list of Umbraco Forms versions can be found on [nuget.org](https://www.nuget.org/packages/Umbraco.Forms#versions-body-tab). -3. Run the following command on a command prompt of your choice, replacing `` with the appropriate version identified above: - - ``` - dotnet add package Umbraco.Forms --version - ``` -4. Restart the web application using the following command: - - ``` - dotnet run - ``` - -## Start Building Forms - -Once the installation is successful, you will see a similar screen in the Forms section: - -![Create form](images/start-with-forms-v9.png) - -## Using Forms - -For details on using Forms, see the [Editor Documentation](../editor/creating-a-form/). diff --git a/10/umbraco-forms/installation/the-licensing-model.md b/10/umbraco-forms/installation/the-licensing-model.md deleted file mode 100644 index 748b9876d85..00000000000 --- a/10/umbraco-forms/installation/the-licensing-model.md +++ /dev/null @@ -1,92 +0,0 @@ -# Licensing - -Umbraco Forms is a commercial product. You have a 14-day free trial to try out the product. After your trial expires, you'll need to have a **valid license** to keep using the product on your site. - -## How does it work? - -Licenses are sold per domain and will also work on all subdomains. With every license, you will be able to configure two development/testing domains. - -{% hint style="info" %} -The licenses are not bound to a specific product version. They will work for all versions of the related product, but version 17+ will only be available through a subscription based license (see [announcement](https://github.com/umbraco/Announcements/issues/25)). -{% endhint %} - -### Example - -Let's say that you have a license configured for your domain, `mysite.com`, and you've configured two development domains, `devdomain.com` and `devdomain2.com`. - -The license will cover the following domains: - -* `localhost` -* `*.mysite.com` -* `www.mysite.com` -* `mysite.com.local` -* `devdomain.com` -* `www.devdomain.com` -* `devdomain2.com` -* `www.devdomain2.com` - -{% hint style="info" %} -You can have only 1 license per Umbraco installation. -{% endhint %} - -## What does a license cover? - -There are a few differences as to what the licenses cover: - -* A single license covers the installation of Umbraco Forms in 1 production domain, as well as in 2 development domains. -* The production domain includes **all subdomains** (e.g. `*.mysite.com`), as well as the `.local` extension (e.g. `mysite.com.local`). -* The development domains work with or without the `www` subdomain. -* The license allows for an unlimited number of forms. -* The license also includes `localhost` as a valid domain. - -If you have multiple domains pointing at the same installation, you have the option to purchase and add **additional domains** to your license. - -Additional domains can be purchased from your account on [Umbraco.com](https://umbraco.com). Each additional domain includes 1 live domain and 2 development/testing domains. - -{% hint style="info" %} -This is an add-on domain for existing licenses. Refunds will not be given for this product. -{% endhint %} - -## Configuring your license - -You can look at the pricing, features, and purchase the license on the [Umbraco Forms](https://umbraco.com/products/add-ons/forms/) page. - -When you've bought a license you need to configure it with your domains. You can either configure your license right away or you can do it later by visiting your account on Umbraco.com. - -### Reconfiguration of domains - -Once a license has been configured with the domains, it is not possible to reconfigure them. An exception is when there is a mistake in the domain URL. -As reconfiguration is not possible, you will either need to purchase an additional domain or a [new license](https://umbraco.com/products/umbraco-forms/). - -## Installing your license - -Once you've configured your license with the correct domains, you are ready to install the license on your Umbraco installation. - -1. Download your license from your Umbraco.com account - this will give you a `.lic` file -2. Place the file in the `/umbraco/Licenses` directory in your Umbraco installation - -The `.lic` file must be placed in the `/umbraco/Licenses` directory to be registered by Umbraco Forms. If the file isn't placed correctly, the application will automatically switch to trial mode. - -### Multiple license files - -You can install multiple Umbraco Forms license files without merging them. Place each license file in the `/umbraco/Licenses` directory (or an alternative location). Each file should begin with `umbracoForms`, for example, `umbracoForms.example1.lic` and `umbracoForms.example2.lic`. This setup allows your installation to recognize multiple licensed domains. - -### Alternative license location - -If you can't include the license file in the `/umbraco/Licenses` directory for any reason, it is possible to configure an alternative location for the file. - -It can be configured in the Umbraco installation's `appSettings.json` file by adding the following appSetting. The value contains the path of your custom license directory relative to the root of your Umbraco installation. - -{% hint style="warning" %} -This will also change the location for other Umbraco-related licenses in this project. -{% endhint %} - -```json -{ - "Umbraco": { - "Licensing": { - "Directory": "~/custom-licenses-folder/" - } - } -} -``` diff --git a/10/umbraco-forms/legacy-documentation.md b/10/umbraco-forms/legacy-documentation.md deleted file mode 100644 index 50cadab40d4..00000000000 --- a/10/umbraco-forms/legacy-documentation.md +++ /dev/null @@ -1,7 +0,0 @@ -# Legacy Documentation - -This documentation platform covers only major versions of the Umbraco Forms since Umbraco 9+. If you are using an older version of Umbraco Forms, you will need to go elsewhere. - -The documentation for Umbraco 7 and 8 lives on [our.umbraco.com](https://our.umbraco.com/documentation/Add-ons/). - -
Umbraco 11 Documentationhttps://github.com/umbraco/UmbracoDocs/tree/umbraco-eol-versions/11/umbraco-forms
Umbraco 8 Documentationhttps://our.umbraco.com/documentation/Add-ons/UmbracoForms/
diff --git a/10/umbraco-forms/release-notes.md b/10/umbraco-forms/release-notes.md deleted file mode 100644 index 9ba17dff6f3..00000000000 --- a/10/umbraco-forms/release-notes.md +++ /dev/null @@ -1,818 +0,0 @@ ---- -description: >- - Get an overview of the things changed and fixed in each version of Umbraco Forms. ---- - -# Release Notes - -In this section, we have summarized the changes to Umbraco Forms released in each version. Each version is presented with a link to the [Forms issue tracker](https://github.com/umbraco/Umbraco.Forms.Issues/issues) showing a list of issues resolved in the release. We also link to the individual issues themselves from the detail. - -If there are any breaking changes or other issues to be aware of when upgrading they are also noted here. - -{% hint style="info" %} -If you are upgrading to a new major version, you can find information about the breaking changes in the [Version Specific Upgrade Notes](./upgrading/version-specific.md) article -{% endhint %} - -## Release History - -This section contains the release notes for Umbraco Forms 8 and 10 including all changes for these versions. For each major version, you can find the details about each release. - -
- -Version 10 - -[**10.5.7**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.7) **(September 12th 2024)** - -* Added server-side validation of configured maximum length for short and long answer fields. - -[**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). -* Corrected permission check such that users with only "view entries" permissions can see form details on the dashboard [#1192](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1192). -* Fixed closing of theme picker dialog [#1174](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1174). -* Tightened path check used in middleware for restriction of access to form file uploads. - -[**10.5.4**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.4) **(February 20th 2024)** - -* Fixed ordering of forms by name in security screen [#1122](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1122) -* Updated the copy form dialog to use standard CMS patterns for button state and disable it after clicking [#1121](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1121). -* Ensured UI for the upload of a text file for a prevalue source only allows selection of expected .txt files. -* Fixed handling of API and traditional form posts in reCAPTCHA 3 checks [#1150](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1150) -* Fixed display of validation error when a duplicate form field alias is created [#1152](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1152) -* Fixed issue where file uploads weren't removed as records were deleted. - -[**10.5.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.3) **(January 16th 2024)** - -* Added configuration value `TitleAndDescription:AllowUnsafeHtmlRendering` to allow tighter security for HTML rendering of text entered in the "Title and description" field type. - * See further details on the [configuration page](./developer/configuration/README.md#AllowUnsafeHtmlRendering). -* Added forms dashboard translation for support of custom dashboards [#1125](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1125). -* Resolved an issue where a workflow wasn't executed when conditionally based on a checkbox value [#1124](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1124). -* Added details of the current record (form entry) to the workflow notification [#1042](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1042). -* Fixed issue with styling of hidden fields in the "bootstrap" theme [#1120](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1120). -* Rendered dictionary translations of field captions in backoffice entries view [#1131](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1131). -* Ensured valid format string before rendering validation methods with placeholders [#1132](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1132). -* Ensured Examine re-index user interface completes when no records are available for indexing [#1137](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1137). -* Fixed issue where use of a custom field HTML ID attribute prefix breaks conditional logic in multi-page forms [#1138](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1138). -* Resolved an out of range exception when a condition hides all fields on the final page of a multi-page form. - -[**10.5.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.2) **(November 14th 2023)** - -* Ensured validation pattern's saved for a field are cleared when changing the field type [#1083](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1083). -* Included input of type time in condition evaluation [#1084](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1084). -* Fixed issue with "ends with" condition [#1098](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1098). -* Fixed issue with the display of selected records in the entries list view [#1100](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1100). -* Fixed issue with display of newly created forms in the tree where permissions are managed with user groups and user specific override exists [#1102](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1102). -* Fixed issue magic string replacement in email field names [#1107](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1107). -* Fixed broken link in magic string notice [#1109](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1109). -* Replaced save success message with a failed notification when cancelling form save via notifications [#1002](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1002). -* Removed usage of inline styles from the form's default theme [#1110](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1110). -* Ensured an index exists on the `UFForms.FolderKey` column. -* Ensured that the Umbraco hooks for server-side sanitization are called when saving form field's input from a rich text editor. - -[**10.5.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.1) **(September 19th 2023)** - -* Ensured uploaded file protection is based on permission to view rather than edit entries [#1058](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1058) -* Improved markup for screen reader access when creating a form [#1067](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1067) -* Styled the workflow name field to be full width to avoid cut-off of the text [#1079](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1079) -* Fixed field icon styling [#1065](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1065) -* Ensured the default theme supports anchoring to the post submission message [#1066](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1066) - -[**10.5.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.0) **(August 17th 2023)** - -* All items listed under 10.5.0-rc1. -* Removed the unnecessary set of global JavaScript variable that could trigger a console error under certain conditions [#1056](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1056) -* Ensured that files in form submissions are accessible without the "Manage Forms" permission [#1058](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1058) -* Further updated the dependency on `aspnet-client-validation` to correct an issue with validating mandatory dropdown questions, [#1059](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1059) -* Fixed issue where a race condition in creating a user security record on first access could lead to a one-off exception. - -[**10.5.0-rc1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.5.0) **(August 1st 2023)** - -* Added cache options to prevalue sources. -* Added the option to use the `www.recaptcha.net` domain for the reCAPTCHA 3 field type. -* Applied accessibility improvements to markup in the Forms default theme [#1038](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1038) -* Added behavior to scroll to the form when navigating multiple page forms [#1037](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1037) -* Added a setting for the files selected label text for the file upload field type [#1039](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1039) -* Fixed a casing issue with the form picker [#1040](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1040) -* Ensured custom field settings applied to the data consent field type are used in the creation of new forms [#1034](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1034) -* Fixed issue related to conditions applied to radio button or checkbox lists when a custom field ID prefix is configured [#1043](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1043) -* Fixed a second issue related to conditions found when hiding a field based on a non-visible field [#1045](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1045) -* Clarified the labeling on selecting to include attachments in email workflows [#1044](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1044) -* Fixed issue with Umbraco Documents prevalue source retrieving unpublished nodes [#1030](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1030) -* Updated naming of primary keys to match database conventions [#1049](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1049) -* Fixed issue with retrieving forms for a user with start folders defined [#1050](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1050) -* Updated dependency on `aspnet-client-validation` to correct the rendering of the validation summary when validating mandatory single and multiple choice answers, [#1053](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1053) - -[**10.4.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.4.0) **(June 13th 2023)** - -**Note**: If upgrading from a previous version and already using the headless API, please ensure to [enable the API via configuration](developer/configuration/#enableformsapi). - -* Ensured a case insensitive request check for protecting access to files uploaded to the media system. -* Updated dependency on `aspnet-client-validation` to resolve an issue with validation of mandatory radio button or checkbox lists [#1028](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1028) -* All updates noted under 10.4.0-rc1. - -[**10.4.0-rc1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.4.0) **(June 1st 2023)** - -* Added customizable behavior for the fields added to newly created forms [#1013](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1013) -* Added hook for custom validation for headless API [#1012](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1013) -* Added optional culture parameter to headless API [#989](https://github.com/umbraco/Umbraco.Forms.Issues/issues/989) -* Added support for use of reCAPTCHA fields with the headless API [#989](https://github.com/umbraco/Umbraco.Forms.Issues/issues/989) -* Added configuration to enable or disable the headless API [#1027](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1027) -* Resolved concurrency issue with prevalue sources [#997](https://github.com/umbraco/Umbraco.Forms.Issues/issues/997) -* Added [configuration options for IP recording](developer/configuration/#recordiptrackingbehavior) with form submissions [#1000](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1000) -* Performance optimizations for tree rendering, form submission and workflow execution -* Added tag helper for rendering a form -* Provided messaging when using rich text fields in case of a missing rich text Data Type -* Fixed an issue with the configurable removal of the default form templates [#1025](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1025) - -[**10.3.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.3.3) **(May 30th 2023)** - -* Fixed issue with validation of uploaded files without extensions [#1020](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1020) -* Fixed typo in Danish translation [#1017](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1017) -* Allowed edit of field previously configured with a subsequently removed field type [#1015](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1015) -* Fixed encoding and display of entries page title [#1009](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1009) -* Fixed creation of primary keys for tables missing them with new installs on SQLite [#1008](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1008) -* Handled a null reference issue that could occur when copying forms with null setting values -* Fixed placeholder parsing for mandatory and regular expression pattern validation messages using dictionary values - -[**10.3.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.3.2) **(April 18th 2023)** - -* Fixed issue with field mapper in Umbraco nodes workflow not respecting magic string placeholders [#1005](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1005) -* Fixed issue with range selector in backoffice responding only to drag events and not click ones - -[**10.3.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.3.1) **(April 4th 2023)** - -* Fixed UI issue with access to submit message workflow [#998](https://github.com/umbraco/Umbraco.Forms.Issues/issues/998) - -[**10.3.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.3.0) **(March 21st 2023)** - -* Fixed issue with an encoding of setting values in workflows [#988](https://github.com/umbraco/Umbraco.Forms.Issues/issues/988) -* Fixed issue with the GetPrevalueMaps method used in email workflow and exports where we have two prevalue sources of the same type on the form [#990](https://github.com/umbraco/Umbraco.Forms.Issues/issues/990) -* Exposed enabled property in conditions in API result and view model [#993](https://github.com/umbraco/Umbraco.Forms.Issues/issues/993) -* Fixed issue with the clearing of numeric setting values [#994](https://github.com/umbraco/Umbraco.Forms.Issues/issues/994) -* Added form settings to allow for the configuration of which fields are shown in the entries view per form [#336](https://github.com/umbraco/Umbraco.Forms.Issues/issues/336) -* Added rich text header and footer fields to Razor email workflow [#853](https://github.com/umbraco/Umbraco.Forms.Issues/issues/853) -* Added option for rich text formatting in the message shown after form submission [#873](https://github.com/umbraco/Umbraco.Forms.Issues/issues/873) -* Added support for loading workflows from form templates [#909](https://github.com/umbraco/Umbraco.Forms.Issues/issues/909) -* Added show/hide label option to all relevant field types [#925](https://github.com/umbraco/Umbraco.Forms.Issues/issues/925) -* Added ability for developers to configure the options for text field validation via regular expression [#936](https://github.com/umbraco/Umbraco.Forms.Issues/issues/936) -* Provided access to the send Razor email workflow settings via the view model used for the email template [#973](https://github.com/umbraco/Umbraco.Forms.Issues/issues/973) -* Added configuration to provide default values for form button labels [#985](https://github.com/umbraco/Umbraco.Forms.Issues/issues/985) - -[**10.2.4**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.2.4) **(March 7th 2023)** - -* Improved labeling of workflows [#977](https://github.com/umbraco/Umbraco.Forms.Issues/issues/977) -* Removed initial brief visibility of fieldset hidden by conditions [#970](https://github.com/umbraco/Umbraco.Forms.Issues/issues/970) -* Fixed display of "automatic" label associated with workflows when manual approval is not enabled -* Updated workflow processing to take account of the `IgnoreWorkFlowsOnEdit` setting -* Fixed issue with empty member properties in the "send to URL" workflow [#984](https://github.com/umbraco/Umbraco.Forms.Issues/issues/984%E2%80%8B) -* Fixed load of XSLT file in send email workflow (V9+) [#974](https://github.com/umbraco/Umbraco.Forms.Issues/issues/974) -* Added detail of container widths in headless/AJAX API (V10+) [#981](https://github.com/umbraco/Umbraco.Forms.Issues/issues/981) -* Fixed authorization error after marking a field as nonsensitive data (V10+) [#976](https://github.com/umbraco/Umbraco.Forms.Issues/issues/976) -* Fixed link rendering following the use of URL picker from a rich text field (V10+) [#972](https://github.com/umbraco/Umbraco.Forms.Issues/issues/972) -* Fixed issue with magic string replacement for member properties in "sent to URL" workflow (V10+) [#969](https://github.com/umbraco/Umbraco.Forms.Issues/issues/969) -* Fixed issue with culture-specific encoding leading to an error with adding user security record (V10+) [#966](https://github.com/umbraco/Umbraco.Forms.Issues/issues/966) -* Fixed issue where the template is not pre-selected in default workflows applied to empty form (V10+) - -[**10.2.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.2.3) **(February 7th 2023)** - -* Fixed error with saving form in backoffice that uses a conditionally shown checkbox [#960](https://github.com/umbraco/Umbraco.Forms.Issues/issues/960) and [#961](https://github.com/umbraco/Umbraco.Forms.Issues/issues/961) -* Fixed editing issue with "include sensitive data" flag for workflow [#958](https://github.com/umbraco/Umbraco.Forms.Issues/issues/958) -* Fixed issue with backoffice editing of conditionally shown mandatory field [#956](https://github.com/umbraco/Umbraco.Forms.Issues/issues/956) -* Fixed casing regression issue with client-side file names (V9+) [#962](https://github.com/umbraco/Umbraco.Forms.Issues/issues/962) -* Fixed regression issue with "allowed forms" selection on form picker Data Type (V10+) [#957](https://github.com/umbraco/Umbraco.Forms.Issues/issues/957) -* Fixed regression issue with saving of reCAPTCHA score (V10+) [#955](https://github.com/umbraco/Umbraco.Forms.Issues/issues/955) -* Fixed issue with sending attachments in emails with non-default media storage (V10+) [#952](https://github.com/umbraco/Umbraco.Forms.Issues/issues/952) -* Fixed reference to incorrect configuration key for scheduled record deletion (V10+) [#951](https://github.com/umbraco/Umbraco.Forms.Issues/issues/951) -* Fixed issue with magic string replacement in "sent to URL" workflow [#948](https://github.com/umbraco/Umbraco.Forms.Issues/issues/948) - -[**10.2.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.2.2) **(January 17th 2023)** - -* Restored ability to theme a specific form [#860](https://github.com/umbraco/Umbraco.Forms.Issues/issues/860) -* Minified client-side assets shipped for use in themes and field types [#913](https://github.com/umbraco/Umbraco.Forms.Issues/issues/913) -* Displayed path to selected post form submission page on picker [#931](https://github.com/umbraco/Umbraco.Forms.Issues/issues/931) -* Added logging to honeypot capture [#911](https://github.com/umbraco/Umbraco.Forms.Issues/issues/911) -* Fixed CSS validation errors [#932](https://github.com/umbraco/Umbraco.Forms.Issues/issues/932) -* Fixed issue where an invalid value stored via file upload could lead to media directory removal [#933](https://github.com/umbraco/Umbraco.Forms.Issues/issues/933) -* Improved performance of backoffice forms search [#940](https://github.com/umbraco/Umbraco.Forms.Issues/issues/940) -* Added extension method for retrieval of selected prevalues in workflow, resolving the issue with delimiter clash, and multiple selections [#941](https://github.com/umbraco/Umbraco.Forms.Issues/issues/941) -* Added support for file uploads via the headless/AJAX API (V10+ only) [#922](https://github.com/umbraco/Umbraco.Forms.Issues/issues/922) -* Ensured versioning and documentation for headless/AJAX API is scoped only to Forms API controllers (V10+ only) -* Ensured record values changed in approval workflows are persisted -* Ensured reference to Configuration class in insert form macro partial view is globally specified to ensure it doesn't clash with other usings (V8 only) -* Fixed issue with the processing of magic string replacements following server-side validation failure [#872](https://github.com/umbraco/Umbraco.Forms.Issues/issues/872) -* Fixed issue with editing legacy forms in the backoffice that have fieldsets without unique Ids [#944](https://github.com/umbraco/Umbraco.Forms.Issues/issues/944) - -[**10.2.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.2.1) **(November 25th 2022)** - -* Fixed issue with conditions and check box lists [#910](https://github.com/umbraco/Umbraco.Forms.Issues/issues/910) and [#899](https://github.com/umbraco/Umbraco.Forms.Issues/issues/899) -* Fixed regression issue with send to URL email workflow [#912](https://github.com/umbraco/Umbraco.Forms.Issues/issues/912) -* Ensured newly created field and workflow settings based on checkbox values have an explicit true or false (not empty) setting [#916](https://github.com/umbraco/Umbraco.Forms.Issues/issues/916) -* Resolved issue with placeholders based on the current page or HTTP context not working on later pages of multi-page forms [#918](https://github.com/umbraco/Umbraco.Forms.Issues/issues/918) -* Resolved issues with the use of reCAPTCHA and file upload fields with the headless API [#920](https://github.com/umbraco/Umbraco.Forms.Issues/issues/920) and [#923](https://github.com/umbraco/Umbraco.Forms.Issues/issues/923) -* Added API key security and the option to disable the anti-forgery token validation for the headless API, for use in server-to-server integrations [#915](https://github.com/umbraco/Umbraco.Forms.Issues/issues/915) -* Fixed translations and updated links to the new documentation platform [#926](https://github.com/umbraco/Umbraco.Forms.Issues/issues/926) - -[**10.2.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.2.0) **(November 8th 2022)** - -* Headless/AJAX forms API [#730](https://github.com/umbraco/Umbraco.Forms.Issues/issues/730) -* Automatic removal of entries after configured period [#656](https://github.com/umbraco/Umbraco.Forms.Issues/issues/656) -* Magic string formatters [#828](https://github.com/umbraco/Umbraco.Forms.Issues/issues/828) -* Block list and nested content title filter [#170](https://github.com/umbraco/Umbraco.Forms.Issues/issues/170) and [#879](https://github.com/umbraco/Umbraco.Forms.Issues/issues/879) -* Configuration of field and workflow settings [#139](https://github.com/umbraco/Umbraco.Forms.Issues/issues/139) and [#134](https://github.com/umbraco/Umbraco.Forms.Issues/issues/134) -* Improved the messaging displayed to the editor when applying a condition on an empty value. [#886](https://github.com/umbraco/Umbraco.Forms.Issues/issues/886) -* Set HTML field type for email fields in the provided form templates. [#880](https://github.com/umbraco/Umbraco.Forms.Issues/issues/880) -* Added support for custom icons for custom field types. [#863](https://github.com/umbraco/Umbraco.Forms.Issues/issues/863) -* Added configuration to remove the provided email and form templates from the selection. [#849](https://github.com/umbraco/Umbraco.Forms.Issues/issues/849) -* Added the option for a drop-down prompt. [#843](https://github.com/umbraco/Umbraco.Forms.Issues/issues/843) -* Added details of the current form to the field's view model. [#837](https://github.com/umbraco/Umbraco.Forms.Issues/issues/837) -* For multi-page forms, skip pages that contain no visible fields due to conditions. [#38](https://github.com/umbraco/Umbraco.Forms.Issues/issues/38) -* A member key has been added to the RecordFilter object, used when programmatically retrieving a filtered set of form entries. -* Fixed mandatory data consent not being validated correctly where conditions are set. [#897](https://github.com/umbraco/Umbraco.Forms.Issues/issues/897) -* Fixed error on the export of entries when there are many records to export [#864](https://github.com/umbraco/Umbraco.Forms.Issues/issues/864) -* Improved condition label display when matching on an empty value. [#886](https://github.com/umbraco/Umbraco.Forms.Issues/issues/886) -* Added documentation and base class to allow users to change the location of prevalue source text files. [#789](https://github.com/umbraco/Umbraco.Forms.Issues/issues/789) -* Added configurable prefix for form element Ids. -* Resolved issue with removed field type preventing edit of form [#899](https://github.com/umbraco/Umbraco.Forms.Issues/issues/899) -* Added functionality to replace magic strings within the rich text field content [#903](https://github.com/umbraco/Umbraco.Forms.Issues/issues/903) - -[**10.1.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.1.3) **(October 18th 2022)** - -* Fixed issue with page button conditions on non-default theme [#893](https://github.com/umbraco/Umbraco.Forms.Issues/issues/893) -* Handled migration case when switching to store form definitions in the database after installing or upgrading to 8.13 [#888](https://github.com/umbraco/Umbraco.Forms.Issues/issues/888) -* Aligned client and server-side case sensitivity for conditions based on checkbox fields [#875](https://github.com/umbraco/Umbraco.Forms.Issues/issues/875) -* Ensured duplicate prevalues are handled without error when replacing values with captions in export or email sending [#874](https://github.com/umbraco/Umbraco.Forms.Issues/issues/874) -* Fixed approve icon display [#870](https://github.com/umbraco/Umbraco.Forms.Issues/issues/870) -* Fixed menu styling for datasource reload [#869](https://github.com/umbraco/Umbraco.Forms.Issues/issues/869) -* Ensured field CSS values are generated without duplicates [#864](https://github.com/umbraco/Umbraco.Forms.Issues/issues/864) -* Fixed issue with rendering the create menu icon (V10) -* Disabled spellcheck on password fields. -* Fixed issue where default workflow when removed on a newly created form is added back on save. -* Prevented hidden field for record Id from being populated if the feature for editable records is not enabled. - -[**10.1.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.1.2) **(September 13th 2022)** - -* Resolved the issue with form/theme picker when used with CMS 10.2 by migrating from usage of the umb-overlay directive (V10 only) [#381](https://github.com/umbraco/Umbraco.Forms.Issues/issues/381) and [#867](https://github.com/umbraco/Umbraco.Forms.Issues/issues/867) -* Removed rendering of the anti-forgery token when a check is disabled (V8 only) [#864](https://github.com/umbraco/Umbraco.Forms.Issues/issues/864) and [#859](https://github.com/umbraco/Umbraco.Forms.Issues/issues/859) -* Restored member details display on the entry details view -* Fixed formatting of default form validation messages -* Fixed potential null reference when re-indexing form entries (V10 only) -* Fixed incorrect storage of values posted from forms that were hidden within conditional fieldsets - -[**10.1.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.1.1) **(September 6th 2022)** - -* Restored ability to set workflows on approved status even when moderation is not used (allowing retrieval of record Id in workflows) [#835](https://github.com/umbraco/Umbraco.Forms.Issues/issues/835) -* Allowed for workflow retry regardless of result [#838](https://github.com/umbraco/Umbraco.Forms.Issues/issues/838) -* Fixed display of form state and member details on workflow entries listing [#842](https://github.com/umbraco/Umbraco.Forms.Issues/issues/842%E2%80%8B) -* Fixed issue with date rendering on entry details view [#848](https://github.com/umbraco/Umbraco.Forms.Issues/issues/848) -* Ensured culture used for workflow re-try is the same as that used when the form was submitted [#851](https://github.com/umbraco/Umbraco.Forms.Issues/issues/851) -* Cleaned up parameter passing in form field backoffice render and edit views [#854](https://github.com/umbraco/Umbraco.Forms.Issues/issues/854) -* Fixed case sensitive file issue with Recaptcha V2 field type [#846](https://github.com/umbraco/Umbraco.Forms.Issues/issues/846) (V9+ only) -* Exposed target object in notifications where not available as a public field (V9+ only) -* Fixed issue when using conditions based on select lists and prevalues with captions - -[**10.1.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.1.0) **(August 9th 2022)** - -* Added workflow audit trail. -* Added workflow retry option. -* Added option to customize the behavior of default workflows, including mandatory workflows [#654](https://github.com/umbraco/Umbraco.Forms.Issues/issues/654) -* Added conditional workflows [#370](https://github.com/umbraco/Umbraco.Forms.Issues/issues/370) -* Added ability to redirect to an external site from workflows, after all have been completed. -* Extended the form picker to use folder structure [#729](https://github.com/umbraco/Umbraco.Forms.Issues/issues/729%E2%80%8B) -* Added option for prevalue captions [#84](https://github.com/umbraco/Umbraco.Forms.Issues/issues/84%E2%80%8B) -* Ensured user group start folder aggregation for user's permissions doesn't include user groups that don't have access to Forms [#772](https://github.com/umbraco/Umbraco.Forms.Issues/issues/772) -* Added option for creating permissions on form for user groups to all groups, or all groups the creating user is part of. -* Provided fixes for issues with rendering localized dates in the backoffice entries view [#777](https://github.com/umbraco/Umbraco.Forms.Issues/issues/777) -* Added read-only, rich text Data Type (V9 and 10). -* Friendlier extensions for registering custom types (V10). -* Added details of the page where the form was submitted to Excel download [#768](https://github.com/umbraco/Umbraco.Forms.Issues/issues/768%E2%80%8B) -* Added indication of options for "magic strings" when adding fields and workflows to forms. [#765](https://github.com/umbraco/Umbraco.Forms.Issues/issues/765) -* Ensured the order of fields retrieved for a record from the database matches the field order defined on the form. [#661](https://github.com/umbraco/Umbraco.Forms.Issues/issues/661) -* The trigger for client-side conditions checked can now be configured between "change" (the default) and "input". [#784](https://github.com/umbraco/Umbraco.Forms.Issues/issues/784) -* Fixed issue with displaying entries where a member's Id was stored as a Guid via a custom membership provider. [#798](https://github.com/umbraco/Umbraco.Forms.Issues/issues/798) -* Fixed issue with console request for client validation script source map. [#796](https://github.com/umbraco/Umbraco.Forms.Issues/issues/796) -* Fixed issue with reCAPTCHA V3 field type. [#799](https://github.com/umbraco/Umbraco.Forms.Issues/issues/799) -* Added a missing translation [#804](https://github.com/umbraco/Umbraco.Forms.Issues/issues/804%E2%80%8B) -* Styling improvements to form and theme picker [#107](https://github.com/umbraco/Umbraco.Forms.Issues/issues/107) and [#814](https://github.com/umbraco/Umbraco.Forms.Issues/issues/814) -* Mark-up changes for accessibility of button elements [#383](https://github.com/umbraco/Umbraco.Forms.Issues/issues/383) -* Removed elements types from prevalue source options [#805](https://github.com/umbraco/Umbraco.Forms.Issues/issues/805) -* Fixed styling and color of Confirm overlay for fieldsets and fields [#808](https://github.com/umbraco/Umbraco.Forms.Issues/issues/808) -* Added show/hide label option to data consent and text/description fields [#810](https://github.com/umbraco/Umbraco.Forms.Issues/issues/810), [#823](https://github.com/mbraco/Umbraco.Forms.Issues/issues/823), and [#810](https://github.com/umbraco/Umbraco.Forms.Issues/issues/810) -* Fixed issue with duplication of magic string replacement [#811](https://github.com/umbraco/Umbraco.Forms.Issues/issues/811) -* Ensured field references in copied forms are updated to the new fields [#815](https://github.com/umbraco/Umbraco.Forms.Issues/issues/815) -* Fixed validation of mandatory date field [#817](https://github.com/umbraco/Umbraco.Forms.Issues/issues/817) -* Added tag option for text/description field type [#821](https://github.com/umbraco/Umbraco.Forms.Issues/issues/821) -* Added additional input type options to text field type [#825](https://github.com/umbraco/Umbraco.Forms.Issues/issues/825) -* Restored open/edit options to form picker preview [#827](https://github.com/umbraco/Umbraco.Forms.Issues/issues/827) -* Improved performance of permission-related queries [#827](https://github.com/umbraco/Umbraco.Forms.Issues/issues/827) (raised in discussion) - -[**10.0.5**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.5) **(July 14th 2022)** - -* Fixed macro partial view tree so Razor Class Library (RCL) shipped partials from Forms are only shown in the "picker" dialog [#814](https://github.com/umbraco/Umbraco.Forms.Issues/issues/814) -* Removed false positive reports of missing indexes on tables [#803](https://github.com/umbraco/Umbraco.Forms.Issues/issues/803) -* Fixed issue with saving forms in upgrade scenarios, when workflows that have settings introduced after the form was created (and hence null values) [#813](https://github.com/umbraco/Umbraco.Forms.Issues/issues/813) - -[**10.0.4**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.4) **(July 7th 2022)** - -* Fixed issue with incorrect identity setting on user group permission records [#800](https://github.com/umbraco/Umbraco.Forms.Issues/issues/800) -* Restored partial views shipped in RCL to macro partial view picker. - -[**10.0.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.3) **(July 1st 2022)** - -* Fixed issues with sending razor workflows related to out-of-the-box template shipping as a razor class library [794](https://github.com/umbraco/Umbraco.Forms.Issues/issues/794) - -[**10.0.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.2) **(June 29th 2022)** - -* Fixed issue creating user group permission records [#793](https://github.com/umbraco/Umbraco.Forms.Issues/issues/793) and [#794](https://github.com/umbraco/Umbraco.Forms.Issues/issues/794) - -[**10.0.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.1) **(June 28th 2022)** - -* Fixed issue with deletes when using SQLite [#792](https://github.com/umbraco/Umbraco.Forms.Issues/issues/792) -* Fixed nullability issue with prevalues on data consent field [#794](https://github.com/umbraco/Umbraco.Forms.Issues/issues/794) - -[**10.0.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.0) **(June 16th 2022)** - -* Compatibility with .NET 6 and Umbraco 10 - -
- -
- -Version 8 - -[**8.13.16**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.16) **(October 15th 2024)** - -* Added server-side validation of configured maximum length for short and long answer fields. - -[**8.13.15**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.15) **(April 16th 2024)** - -* Tightened path check used in middleware for restriction of access to form file uploads. - -[**8.13.14**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.14) **(February 20th 2024)** - -* Null checks on setting prevalue captions handling issues with upgraded form definitions [#1148](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1148). -* Fixed ordering of forms by name in security screen [#1122](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1122) -* Updated the copy form dialog to use standard CMS patterns for button state and disable it after clicking [#1121](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1121). -* Ensured UI for the upload of a text file for a prevalue source only allows the selection of expected .txt files. -* Tightened path check used in middleware for restriction of access to form file uploads. - -[**8.13.13**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.13) **(January 16th 2024)** - -* Back-ported backoffice performance improvements introduced in later versions [#1119](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1119). -* Fixed permissions issue with use of start folder and group permissions [#1118](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1118) -* Added configuration value `TitleAndDescriptionAllowUnsafeHtmlRendering` to allow tighter security for HTML rendering of text entered in the "Title and description" field type. - * See further details on the [configuration page](./developer/configuration/README.md#AllowUnsafeHtmlRendering). -* Added forms dashboard translation for support of custom dashboards [#1125](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1125). -* Resolved an issue where a workflow wasn't executed when conditionally based on a checkbox value [#1124](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1124). - -[**8.13.12**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.12) **(November 14th 2023)** - -* Ensured validation pattern's saved for a field are cleared when changing the field type [#1083](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1083). -* Included input of type time in condition evaluation [#1084](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1084). -* Fixed issue with "ends with" condition [#1098](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1098). -* Fixed issue with the display of selected records in the entries list view [#1100](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1100). -* Fixed issue with display of newly created forms in the tree where permissions are managed with user groups and user specific override exists [#1102](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1102). -* Fixed issue magic string replacement in email field names [#1107](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1107). -* Fixed broken link in magic string notice [#1109](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1109). -* Back-ported backoffice form list rendering optimization from Forms 10+. - -[**8.13.11**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.11) **(September 19th 2023)** - -* Fixed JavaScript console error visible when loading form for editing [#1056](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1056) -* Ensured uploaded file protection is based on permission to view rather than edit entries [#1058](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1058) -* Further updated the dependency on `aspnet-client-validation` to correct an issue with validating mandatory dropdown questions [#1059](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1059) -* Restored the `UmbracoFormController.GoForward` method to have a `protected` access modifier (following a breaking change to `private` in 8.7) [#1061](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1061) -* Improved markup for screen reader access when creating a form [#1067](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1067) -* Fixed null reference exception triggered when deleting a record in a background task [#1069](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1069) -* Styled the workflow name field to be full width to avoid cut-off of the text [#1079](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1079) -* Prevented unpublished nodes from being returned in the prevalue source based on Umbraco documents [#1030](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1030) - -[**8.13.10**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.10) **(August 1st 2023)** - -* Updated dependency on `aspnet-client-validation` to resolve two issues with validation of mandatory radio button or checkbox lists [#1028](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1028), [#1053](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1053) -* Ensured a case insensitive request check for protecting access to files uploaded to the media system. -* Made `RecordService` public to provide access to static events. - -[**8.13.9**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.9) **(May 30th 2023)** - -* Fixed issue with validation of uploaded files without extensions [#1020](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1020) -* Fixed typo in Danish translation [#1017](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1017) -* Fixed encoding and display of entries page title [#1009](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1009) -* Handled a null reference issue that could occur when copying forms with null setting values - -[**8.13.8**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.8) **(April 4th 2023)** - -* Fixed issue with the `GetPrevalueMaps` method used in email workflow and exports where we have two prevalue sources of the same type on the form [#990](https://github.com/umbraco/Umbraco.Forms.Issues/issues/990) -* Fixed issue with the clearing of numeric setting values [#994](https://github.com/umbraco/Umbraco.Forms.Issues/issues/994) -* Fixed issue with an encoding of setting values in workflows [#988](https://github.com/umbraco/Umbraco.Forms.Issues/issues/988) - -[**8.13.7**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.7) **(March 7th 2023)** - -* Improved labeling of workflows [#977](https://github.com/umbraco/Umbraco.Forms.Issues/issues/977) -* Removed initial brief visibility of fieldset hidden by conditions [#970](https://github.com/umbraco/Umbraco.Forms.Issues/issues/970) -* Fixed display of "automatic" label associated with workflows when manual approval is not enabled -* Updated workflow processing to take account of the `IgnoreWorkFlowsOnEdit` setting -* Fixed issue with empty member properties in the "send to URL" workflow [#984](https://github.com/umbraco/Umbraco.Forms.Issues/issues/984%E2%80%8B) -* Fixed load of XSLT file in send email workflow (V9+) [#974](https://github.com/umbraco/Umbraco.Forms.Issues/issues/974) -* Added detail of container widths in headless/AJAX API (V10+) [#981](https://github.com/umbraco/Umbraco.Forms.Issues/issues/981) -* Fixed authorization error after marking a field as nonsensitive data (V10+) [#976](https://github.com/umbraco/Umbraco.Forms.Issues/issues/976) -* Fixed link rendering following the use of URL picker from a rich text field (V10+) [#972](https://github.com/umbraco/Umbraco.Forms.Issues/issues/972) -* Fixed issue with magic string replacement for member properties in "sent to URL" workflow (V10+) [#969](https://github.com/umbraco/Umbraco.Forms.Issues/issues/969) -* Fixed issue with culture-specific encoding leading to an error with adding user security record (V10+) [#966](https://github.com/umbraco/Umbraco.Forms.Issues/issues/966) -* Fixed issue where the template is not pre-selected in default workflows applied to empty form (V10+) - -[**8.13.6**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.6) **(February 7th 2023)** - -* Fixed error with saving form in backoffice that uses a conditionally shown checkbox [#960](https://github.com/umbraco/Umbraco.Forms.Issues/issues/960) and [#961](https://github.com/umbraco/Umbraco.Forms.Issues/issues/961) -* Fixed editing issue with "include sensitive data" flag for workflow [#958](https://github.com/umbraco/Umbraco.Forms.Issues/issues/958) -* Fixed issue with backoffice editing of conditionally shown mandatory field [#956](https://github.com/umbraco/Umbraco.Forms.Issues/issues/956) -* Fixed casing regression issue with client-side file names (V9+) [#962](https://github.com/umbraco/Umbraco.Forms.Issues/issues/962) -* Fixed regression issue with "allowed forms" selection on form picker Data Type (V10+) [#957](https://github.com/umbraco/Umbraco.Forms.Issues/issues/957) -* Fixed regression issue with saving of reCAPTCHA score (V10+) [#955](https://github.com/umbraco/Umbraco.Forms.Issues/issues/955) -* Fixed issue with sending attachments in emails with non-default media storage (V10+) [#952](https://github.com/umbraco/Umbraco.Forms.Issues/issues/952) -* Fixed reference to incorrect configuration key for scheduled record deletion (V10+) [#951](https://github.com/umbraco/Umbraco.Forms.Issues/issues/951) -* Fixed issue with magic string replacement in "sent to URL" workflow [#948](https://github.com/umbraco/Umbraco.Forms.Issues/issues/948) - -[**8.13.5**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.5) **(January 17th 2023)** - -* Restored ability to theme a specific form [#860](https://github.com/umbraco/Umbraco.Forms.Issues/issues/860) -* Minified client-side assets shipped for use in themes and field types [#913](https://github.com/umbraco/Umbraco.Forms.Issues/issues/913) -* Displayed path to selected post form submission page on picker [#931](https://github.com/umbraco/Umbraco.Forms.Issues/issues/931) -* Added logging to honeypot capture [#911](https://github.com/umbraco/Umbraco.Forms.Issues/issues/911) -* Fixed CSS validation errors [#932](https://github.com/umbraco/Umbraco.Forms.Issues/issues/932) -* Fixed issue where an invalid value stored via file upload could lead to media directory removal [#933](https://github.com/umbraco/Umbraco.Forms.Issues/issues/933) -* Improved performance of backoffice forms search [#940](https://github.com/umbraco/Umbraco.Forms.Issues/issues/940) -* Added extension method for retrieval of selected prevalues in workflow, resolving the issue with delimiter clash, and multiple selections [#941](https://github.com/umbraco/Umbraco.Forms.Issues/issues/941) -* Added support for file uploads via the headless/AJAX API (V10+ only) [#922](https://github.com/umbraco/Umbraco.Forms.Issues/issues/922) -* Ensured versioning and documentation for headless/AJAX API is scoped only to Forms API controllers (V10+ only) -* Ensured record values changed in approval workflows are persisted -* Ensured reference to Configuration class in insert form macro partial view is globally specified to ensure it doesn't clash with other usings (V8 only) -* Fixed issue with the processing of magic string replacements following server-side validation failure [#872](https://github.com/umbraco/Umbraco.Forms.Issues/issues/872) -* Fixed issue with editing legacy forms in the backoffice that have fieldsets without unique Ids [#944](https://github.com/umbraco/Umbraco.Forms.Issues/issues/944) - -[**8.13.4**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.4) **(November 15th 2022)** - -* Resolved issue with removed field type preventing edit of form [#899](https://github.com/umbraco/Umbraco.Forms.Issues/issues/899) -* Fixed mandatory data consent not being validated correctly where conditions are set. [#897](https://github.com/umbraco/Umbraco.Forms.Issues/issues/897) -* Fixed error on the export of entries when there are many records to export [#864](https://github.com/umbraco/Umbraco.Forms.Issues/issues/864) -* Added documentation and base class to allow users to change the location of prevalue source text files. [#789](https://github.com/umbraco/Umbraco.Forms.Issues/issues/789) - -[**8.13.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.3) **(October 18th 2022)** - -* Fixed issue with page button conditions on non-default theme [#893](https://github.com/umbraco/Umbraco.Forms.Issues/issues/893) -* Handled migration case when switching to store form definitions in the database after installing or upgrading to 8.13 [#888](https://github.com/umbraco/Umbraco.Forms.Issues/issues/888) -* Aligned client and server-side case sensitivity for conditions based on checkbox fields [#875](https://github.com/umbraco/Umbraco.Forms.Issues/issues/875) -* Ensured duplicate prevalues are handled without error when replacing values with captions in export or email sending [#874](https://github.com/umbraco/Umbraco.Forms.Issues/issues/874) -* Fixed approve icon display [#870](https://github.com/umbraco/Umbraco.Forms.Issues/issues/870) -* Fixed menu styling for datasource reload [#869](https://github.com/umbraco/Umbraco.Forms.Issues/issues/869) -* Ensured field CSS values are generated without duplicates [#864](https://github.com/umbraco/Umbraco.Forms.Issues/issues/864) -* Fixed issue with rendering the create menu icon (V10) -* Disabled spellcheck on password fields. -* Fixed issue where default workflow when removed on a newly created form is added back on save. -* Prevented hidden field for record Id from being populated if the feature for editable records is not enabled. - -[**8.13.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.2) **(September 13th 2022)** - -* Resolved the issue with form/theme picker when used with CMS 10.2 by migrating from usage of the umb-overlay directive (V10 only) [#381](https://github.com/umbraco/Umbraco.Forms.Issues/issues/381) and [#867](https://github.com/umbraco/Umbraco.Forms.Issues/issues/867) -* Removed rendering of the anti-forgery token when a check is disabled (V8 only) [#864](https://github.com/umbraco/Umbraco.Forms.Issues/issues/864) and [#859](https://github.com/umbraco/Umbraco.Forms.Issues/issues/859) -* Restored member details display on the entry details view -* Fixed formatting of default form validation messages -* Fixed potential null reference when re-indexing form entries (V10 only) -* Fixed incorrect storage of values posted from forms that were hidden within conditional fieldsets - -[**8.13.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.1) **(September 6th 2022)** - -* Restored ability to set workflows on approved status even when moderation is not used (allowing retrieval of record Id in workflows) [#835](https://github.com/umbraco/Umbraco.Forms.Issues/issues/835) -* Allowed for workflow retry regardless of result [#838](https://github.com/umbraco/Umbraco.Forms.Issues/issues/838) -* Fixed display of form state and member details on workflow entries listing [#842](https://github.com/umbraco/Umbraco.Forms.Issues/issues/842%E2%80%8B) -* Fixed issue with date rendering on entry details view [#848](https://github.com/umbraco/Umbraco.Forms.Issues/issues/848) -* Ensured culture used for workflow re-try is the same as that used when the form was submitted [#851](https://github.com/umbraco/Umbraco.Forms.Issues/issues/851) -* Cleaned up parameter passing in form field backoffice render and edit views [#854](https://github.com/umbraco/Umbraco.Forms.Issues/issues/854) -* Fixed case sensitive file issue with Recaptcha V2 field type [#846](https://github.com/umbraco/Umbraco.Forms.Issues/issues/846) (V9+ only) -* Exposed target object in notifications where not available as a public field (V9+ only) -* Fixed issue when using conditions based on select lists and prevalues with captions - -[**8.13.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.13.0) **(August 9th 2022)** - -* Added workflow audit trail. -* Added workflow retry option. -* Added option to customize the behavior of default workflows, including mandatory workflows [#654](https://github.com/umbraco/Umbraco.Forms.Issues/issues/654) -* Added conditional workflows [#370](https://github.com/umbraco/Umbraco.Forms.Issues/issues/370) -* Added ability to redirect to an external site from workflows, after all have been completed. -* Extended the form picker to use folder structure [#729](https://github.com/umbraco/Umbraco.Forms.Issues/issues/729%E2%80%8B) -* Added option for prevalue captions [#84](https://github.com/umbraco/Umbraco.Forms.Issues/issues/84%E2%80%8B) -* Ensured user group start folder aggregation for user's permissions doesn't include user groups that don't have access to Forms [#772](https://github.com/umbraco/Umbraco.Forms.Issues/issues/772) -* Added option for creating permissions on form for user groups to all groups, or all groups the creating user is part of. -* Provided fixes for issues with rendering localized dates in the backoffice entries view [#777](https://github.com/umbraco/Umbraco.Forms.Issues/issues/777) -* Added read-only, rich text Data Type (V9 and 10). -* Friendlier extensions for registering custom types (V10). -* Added details of the page where the form was submitted to Excel download [#768](https://github.com/umbraco/Umbraco.Forms.Issues/issues/768%E2%80%8B) -* Added indication of options for "magic strings" when adding fields and workflows to forms. [#765](https://github.com/umbraco/Umbraco.Forms.Issues/issues/765) -* Ensured the order of fields retrieved for a record from the database matches the field order defined on the form. [#661](https://github.com/umbraco/Umbraco.Forms.Issues/issues/661) -* The trigger for client-side conditions checked can now be configured between "change" (the default) and "input". [#784](https://github.com/umbraco/Umbraco.Forms.Issues/issues/784) -* Fixed issue with displaying entries where a member's Id was stored as a Guid via a custom membership provider. [#798](https://github.com/umbraco/Umbraco.Forms.Issues/issues/798) -* Fixed issue with console request for client validation script source map. [#796](https://github.com/umbraco/Umbraco.Forms.Issues/issues/796) -* Fixed issue with reCAPTCHA V3 field type. [#799](https://github.com/umbraco/Umbraco.Forms.Issues/issues/799) -* Added a missing translation [#804](https://github.com/umbraco/Umbraco.Forms.Issues/issues/804%E2%80%8B) -* Styling improvements to form and theme picker [#107](https://github.com/umbraco/Umbraco.Forms.Issues/issues/107) and [#814](https://github.com/umbraco/Umbraco.Forms.Issues/issues/814) -* Mark-up changes for accessibility of button elements [#383](https://github.com/umbraco/Umbraco.Forms.Issues/issues/383) -* Removed elements types from prevalue source options [#805](https://github.com/umbraco/Umbraco.Forms.Issues/issues/805) -* Fixed styling and color of Confirm overlay for fieldsets and fields [#808](https://github.com/umbraco/Umbraco.Forms.Issues/issues/808) -* Added show/hide label option to data consent and text/description fields [#810](https://github.com/umbraco/Umbraco.Forms.Issues/issues/810), [#823](https://github.com/mbraco/Umbraco.Forms.Issues/issues/823), and [#810](https://github.com/umbraco/Umbraco.Forms.Issues/issues/810) -* Fixed issue with duplication of magic string replacement [#811](https://github.com/umbraco/Umbraco.Forms.Issues/issues/811) -* Ensured field references in copied forms are updated to the new fields [#815](https://github.com/umbraco/Umbraco.Forms.Issues/issues/815) -* Fixed validation of mandatory date field [#817](https://github.com/umbraco/Umbraco.Forms.Issues/issues/817) -* Added tag option for text/description field type [#821](https://github.com/umbraco/Umbraco.Forms.Issues/issues/821) -* Added additional input type options to text field type [#825](https://github.com/umbraco/Umbraco.Forms.Issues/issues/825) -* Restored open/edit options to form picker preview [#827](https://github.com/umbraco/Umbraco.Forms.Issues/issues/827) -* Improved performance of permission-related queries [#827](https://github.com/umbraco/Umbraco.Forms.Issues/issues/827) (raised in discussion) - -[**8.12.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.12.2) **(June 7th 2022)** - -* Fixed issue with deletion of records in background task (V9 only) [#779](https://github.com/umbraco/Umbraco.Forms.Issues/issues/779) -* Updated logic for start folder evaluation for user groups to exclude groups that don't have access or permissions for forms [#772](https://github.com/umbraco/Umbraco.Forms.Issues/issues/772) -* Update built-in email workflows to include attachments from all fields that support file uploads [#770](https://github.com/umbraco/Umbraco.Forms.Issues/issues/770) -* Fixed wrapping for long conditional expressions [#767](https://github.com/umbraco/Umbraco.Forms.Issues/issues/767) -* Fixed issue with re-presentation of workflow "include sensitive data" setting (V9 only) [#780](https://github.com/umbraco/Umbraco.Forms.Issues/issues/780%E2%80%8B) - -[**8.12.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.12.1) **(May 10th 2022)** - -* Fixed issue with immediate edit of form created by non-admin user [#764](https://github.com/umbraco/Umbraco.Forms.Issues/issues/764) - -[**8.12.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.12.0) **(April 26th 2022)** - -* Added support for start folder configuration at user group level [#749](https://github.com/umbraco/Umbraco.Forms.Issues/issues/749) -* Import/export of forms (V9 only) [#576](https://github.com/umbraco/Umbraco.Forms.Issues/issues/576) -* Added support for greater than/less than conditions using dates [#506](https://github.com/umbraco/Umbraco.Forms.Issues/issues/506) -* Added default logging for write and delete operations on forms, datasources, and prevalue sources [#731](https://github.com/umbraco/Umbraco.Forms.Issues/issues/731) -* Removed the links to uploaded files from the default email template (which no longer work by default, given protection is now in place to prevent access from non-authenticated users) [#736](https://github.com/umbraco/Umbraco.Forms.Issues/issues/736) and [#741](https://github.com/umbraco/Umbraco.Forms.Issues/issues/741) -* Prevented the previous button on multi-page forms from triggering validation (which involved an update to the client-side validation library we have a dependency on when the website is not referencing jQuery) [#741](https://github.com/umbraco/Umbraco.Forms.Issues/issues/741)​ -* Removed reliance on class names for multi-page form navigation to allow removal in custom themes [#740](https://github.com/umbraco/Umbraco.Forms.Issues/issues/740) -* Added details of file upload supported extensions to the view model (that can be used in custom themes or field types) [#744](https://github.com/umbraco/Umbraco.Forms.Issues/issues/744) -* Remove inline scripts from the reCAPTCHA field type (completing the removal of all inline scripts started in the previous release and allowing for the setting of a stricter content security policy) [#745](https://github.com/umbraco/Umbraco.Forms.Issues/issues/745) -* Fixed issue with date display in the backoffice when localized date formats are in use [#747](https://github.com/umbraco/Umbraco.Forms.Issues/issues/747) -* Re-added support for some request context magic strings (V9 only) [#750](https://github.com/umbraco/Umbraco.Forms.Issues/issues/750) -* Restored default permissions for new installs for users to be able to view entries [#753](https://github.com/umbraco/Umbraco.Forms.Issues/issues/753) -* Added configuration for a default email template to use when a new form is created -* Removed the Lato Google font from the shipped default email template due to reported privacy concerns -* Fixed issue with rebuild when razor files are set to be compiled (V9 only) [#738](https://github.com/umbraco/Umbraco.Forms.Issues/issues/738) -* Fixed issue with integer parsing using Swedish culture settings (V9 only) [#757](https://github.com/umbraco/Umbraco.Forms.Issues/issues/757) -* Amended the post as XML workflow to no longer throw if the page name can't be determined (as it can't in a Heartcore setup)​​ -* Added option for a querystring to indicate form submission which will better support the use of Umbraco pages with forms hosted in IFRAMEs from remote sites [#758](https://github.com/umbraco/Umbraco.Forms.Issues/issues/758). -* Fixed issue with the use of back button returning to form and displaying submission message when previously having redirected to a new page. -* Fixed issue with access to forms in folders for users with a single start folder defined. [#759](https://github.com/umbraco/Umbraco.Forms.Issues/issues/759) -* Fixed issue with access to previously created forms for non-admin users. [#764](https://github.com/umbraco/Umbraco.Forms.Issues/issues/764) -* Resolves issue where an authenticated user with access to Forms can enumerate permissions related to forms access for other users. -* Fix the issue with using the export to Excel feature on Linux [#761](https://github.com/umbraco/Umbraco.Forms.Issues/issues/761) -* Fixed issue with saving forms when storing definitions on disk [#762](https://github.com/umbraco/Umbraco.Forms.Issues/issues/762) - -[**8.11.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.11.0) **(March 8th 2022)** - -* Config for control over user access to new forms [#12](https://github.com/umbraco/Umbraco.Forms.Issues/issues/12) -* Management of form permissions by user group [#19](https://github.com/umbraco/Umbraco.Forms.Issues/issues/19) -* Separated permissions for form "design" and "entry viewer" [#3](https://github.com/umbraco/Umbraco.Forms.Issues/issues/3) -* Setting of start folders for users -* Added permission and feature for editing entries via the backoffice [#498](https://github.com/umbraco/Umbraco.Forms.Issues/issues/498) -* Added migration and healthcheck for missing index following V7 upgrade [#713](https://github.com/umbraco/Umbraco.Forms.Issues/issues/713) -* Allow tracking of calculated score in reCAPTCHA checks [#664](https://github.com/umbraco/Umbraco.Forms.Issues/issues/664) -* Removed use of inline scripts allowing setting of a stricter content security policy [#677](https://github.com/umbraco/Umbraco.Forms.Issues/issues/677) -* Fixed typos in setting description (V9 only) [#710](https://github.com/umbraco/Umbraco.Forms.Issues/issues/710) -* Fixed timezone conversion on entries viewer [#723](https://github.com/umbraco/Umbraco.Forms.Issues/issues/723) -* Fixed null reference in backoffice user check for retrieving records outside of a backoffice request [#724](https://github.com/umbraco/Umbraco.Forms.Issues/issues/724) -* Fixed case insensitive view name under forms security (V9 only) [#725](https://github.com/umbraco/Umbraco.Forms.Issues/issues/725) -* Additional translations for localized backoffice: Czech and Danish. -* Fixed issue with clean on already cleaned project (V9 only) [#732](https://github.com/umbraco/Umbraco.Forms.Issues/issues/732) -* Resolved client-side error when the jquery unobtrusive dependency is missing [#734](https://github.com/umbraco/Umbraco.Forms.Issues/issues/734) -* Fixed two typos in label [#727](https://github.com/umbraco/Umbraco.Forms.Issues/issues/727) - -[**8.10.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.10.3) **(February 15th 2022)** - -* Removed rendering of content apps within the Forms section for older versions of CMS that don't support content apps in sections other than content and media (V8 only) [#714](https://github.com/umbraco/Umbraco.Forms.Issues/issues/714) -* Fixed issue with XSLT file selection from media when media isn't using the local folder system [#715](https://github.com/umbraco/Umbraco.Forms.Issues/issues/715) -* Removed duplicate slash in form tree URL to allow opening in new window [#717](https://github.com/umbraco/Umbraco.Forms.Issues/issues/717) -* Ensured reCAPTCHA v3 score is updated when clicking on slider labels [#720](https://github.com/umbraco/Umbraco.Forms.Issues/issues/720) -* Fixed casing issues with field type partial views (V9 only) [#718](https://github.com/umbraco/Umbraco.Forms.Issues/issues/718) -* Fixed issue with distributed cache refreshing (V9 only) [#712](https://github.com/umbraco/Umbraco.Forms.Issues/issues/712) - -[**8.10.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.10.2) **(February 1st 2022)** - -* Reverted change to default config introduced in 8.10.0 [#711](https://github.com/umbraco/Umbraco.Forms.Issues/issues/711) -* Fixed typos in setting description [#710](https://github.com/umbraco/Umbraco.Forms.Issues/issues/710) -* Removed unnecessary display of license restrictions in Umbraco Cloud - -[**8.10.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.10.1) **(January 25th 2022)** - -* Specified serialization settings used by Forms to avoid issues with changes to global defaults [#264](https://github.com/umbraco/Umbraco.Forms.Issues/issues/264) -* Resolved issues related to conditional form logic [#623](https://github.com/umbraco/Umbraco.Forms.Issues/issues/623), [#686](https://github.com/umbraco/Umbraco.Forms.Issues/issues/686), [#689](https://github.com/umbraco/Umbraco.Forms.Issues/issues/689), [#693](https://github.com/umbraco/Umbraco.Forms.Issues/issues/693), and [#695](https://github.com/umbraco/Umbraco.Forms.Issues/issues/695) -* Updated email template to support multiple file upload fields [#691](https://github.com/umbraco/Umbraco.Forms.Issues/issues/691) -* Fixed issue introduced by localization of workflow details [#692](https://github.com/umbraco/Umbraco.Forms.Issues/issues/692) -* Ensured the list of licensed domains on the dashboard includes the full set allocated to license [#697](https://github.com/umbraco/Umbraco.Forms.Issues/issues/697) -* Fixed rendering of HTML entities in form titles in the backoffice [#699](https://github.com/umbraco/Umbraco.Forms.Issues/issues/699) -* Fixed issue with backoffice delete of form with > 2000 associated entries [#700](https://github.com/umbraco/Umbraco.Forms.Issues/issues/700) -* Removed duplicate type attribute from rendered form scripts [#690](https://github.com/umbraco/Umbraco.Forms.Issues/issues/690) -* Fixed issue with distributed cache refreshing (V9 only) [#687](https://github.com/umbraco/Umbraco.Forms.Issues/issues/687) - -[**8.10.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.10.0) **(December 21st 2021)** - -* Localized backoffice for the Forms section [#267](https://github.com/umbraco/Umbraco.Forms.Issues/issues/267) -* Added support for content apps alongside forms [#653](https://github.com/umbraco/Umbraco.Forms.Issues/issues/653) -* Additional settings for text fields -* Enhanced security for file uploads [#11](https://github.com/umbraco/Umbraco.Forms.Issues/issues/11) -* Fixed issues relating to the Umbraco Documents prevalue source [#638](https://github.com/umbraco/Umbraco.Forms.Issues/issues/638) -* Added details available in save events to detect and act on forms or folders being moved [#667](https://github.com/umbraco/Umbraco.Forms.Issues/issues/667) -* Applied dictionary translations to form fields displayed in backoffice entries viewer. [#672](https://github.com/umbraco/Umbraco.Forms.Issues/issues/672) -* Resolved issue with field type script rendering when multiple forms are displayed on a page. [#670](https://github.com/umbraco/Umbraco.Forms.Issues/issues/670) -* Completed support for client-side views to be created outside of the _App\_Plugins_ folder, thus being retained following a _dotnet clean_ (V9 only). [#13](https://github.com/umbraco/Umbraco.Forms.Issues/issues/13) -* Added fallback to default configured Simple Mail Transfer Protocol (SMTP) sender address (V9 only). [#676](https://github.com/umbraco/Umbraco.Forms.Issues/issues/676) -* Fixed casing issue referencing default theme stylesheet (V9 only) [#680](https://github.com/umbraco/Umbraco.Forms.Issues/issues/680) -* Fixed casing issues causing issues with running on Linux [#680](https://github.com/umbraco/Umbraco.Forms.Issues/issues/680) [#682](https://github.com/umbraco/Umbraco.Forms.Issues/issues/682) -* Added support for V8 syntax for the remote address placeholder [#685](https://github.com/umbraco/Umbraco.Forms.Issues/issues/685) - -[**8.9.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.9.1) **(November 23rd 2021)** - -* Fixed issue with the use of conditions dependent on dictionary item values [#671](https://github.com/umbraco/Umbraco.Forms.Issues/issues/671) -* Fixed issue with member field replacements (V9 only) [#674](https://github.com/umbraco/Umbraco.Forms.Issues/issues/674) - -[**8.9.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.9.0) **(November 16th 2021)** - -* Conditional display of "submit" or "next/previous" buttons [#18](https://github.com/umbraco/Umbraco.Forms.Issues/issues/18) -* Include form details in "Sent to URL" workflow [#569](https://github.com/umbraco/Umbraco.Forms.Issues/issues/569) -* Download submitted files organized by entry [#626](https://github.com/umbraco/Umbraco.Forms.Issues/issues/626) -* Ensured the first field with validation error gets focus [#602](https://github.com/umbraco/Umbraco.Forms.Issues/issues/602) -* Fixed null reference exception when deleting records within workflows [#18](https://github.com/umbraco/Umbraco.Forms.Issues/issues/18) and [#100](https://github.com/umbraco/Umbraco.Forms.Issues/issues/100) -* Fixed issue where checkboxes are used in conditions [#192](https://github.com/umbraco/Umbraco.Forms.Issues/issues/192) -* Added missing custom CMS class to text field template [#484](https://github.com/umbraco/Umbraco.Forms.Issues/issues/484) -* Show a list of licensed domains in the backoffice [#629](https://github.com/umbraco/Umbraco.Forms.Issues/issues/629) -* Restored behavior of excluding scripts when rendering forms to only do so when explicitly requested to [#634](https://github.com/umbraco/Umbraco.Forms.Issues/issues/634) -* Added a new event to support hooking into the form entry display in the backoffice [#639](https://github.com/umbraco/Umbraco.Forms.Issues/issues/639) -* Ensured when forms are created from templates that they have a unique page, fieldset, and field Ids [#647](https://github.com/umbraco/Umbraco.Forms.Issues/issues/647) -* Fixed issue with saving of forms with sensitive data by editors, not in the sensitive data user group [#652](https://github.com/umbraco/Umbraco.Forms.Issues/issues/652) -* Removed display of fields in the email template that have no expected user input [#659](https://github.com/umbraco/Umbraco.Forms.Issues/issues/659) -* Amended the “-ing” events (e.g. “Saving”) to be cancellable and allow changes to the object being saved [#663](https://github.com/umbraco/Umbraco.Forms.Issues/issues/663) -* Added a field-type property to hide the mandatory option where it’s not appropriate (that is where there’s no expected user input) [#665](https://github.com/umbraco/Umbraco.Forms.Issues/issues/665) -* Ensured consistent ordering of setting fields [#649](https://github.com/umbraco/Umbraco.Forms.Issues/issues/649) (V9 only) -* Avoid clash of constants in field type views [#657](https://github.com/umbraco/Umbraco.Forms.Issues/issues/657) -* Fixed copy form dialog (v9) [#669](https://github.com/umbraco/Umbraco.Forms.Issues/issues/669) - -[**8.8.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F8.8.0) **(September 14th 2021)** - -* Structure forms in folder [#75](https://github.com/umbraco/Umbraco.Forms.Issues/issues/75) -* Fixed conditional field value being recorded when conditions are not met [#292](https://github.com/umbraco/Umbraco.Forms.Issues/issues/292) -* Autocomplete attributes for forms and fields [#322](https://github.com/umbraco/Umbraco.Forms.Issues/issues/322) -* Workflow UX tidy-up [#334](https://github.com/umbraco/Umbraco.Forms.Issues/issues/334) -* Fixed prevalue sources not finding grandchildren [#365](https://github.com/umbraco/Umbraco.Forms.Issues/issues/365) -* Configuration of a default theme [#398](https://github.com/umbraco/Umbraco.Forms.Issues/issues/398) -* Added busy indicator when exporting to Excel and performing record set operations [#419](https://github.com/umbraco/Umbraco.Forms.Issues/issues/419) and [#575](https://github.com/umbraco/Umbraco.Forms.Issues/issues/575) -* Ensured form submissions with message display follow post/redirect/get pattern [#485](https://github.com/umbraco/Umbraco.Forms.Issues/issues/485), [#572](https://github.com/umbraco/Umbraco.Forms.Issues/issues/572), and [#593](https://github.com/umbraco/Umbraco.Forms.Issues/issues/593) -* Added ability to toggle field labels [#530](https://github.com/umbraco/Umbraco.Forms.Issues/issues/530) -* Added link to a page where the form was submitted from backoffice entry screen [#607](https://github.com/umbraco/Umbraco.Forms.Issues/issues/607) -* Fixed icons for answer types display [#610](https://github.com/umbraco/Umbraco.Forms.Issues/issues/610) -* Fixed display of grid picker form preview [#612](https://github.com/umbraco/Umbraco.Forms.Issues/issues/612) -* Ensured workflow settings updates were saved only when submitting and not closing dialog [#613](https://github.com/umbraco/Umbraco.Forms.Issues/issues/613) -* Fixed issue with conditional fields when forms are copied [#624](https://github.com/umbraco/Umbraco.Forms.Issues/issues/624) -* Fixed issue with settings validation of prevalues with custom field types [#627](https://github.com/umbraco/Umbraco.Forms.Issues/issues/627) -* Better handle deleted form when the content linked to that form [#635](https://github.com/umbraco/Umbraco.Forms.Issues/issues/635) -* Fixed issue with re-submitted edited form records that include file uploads [#632](https://github.com/umbraco/Umbraco.Forms.Issues/issues/632) -* Added validation message when a file upload is configured to accept no file types [#631](https://github.com/umbraco/Umbraco.Forms.Issues/issues/631) -* Updated styling of form page and group titles to better indicate that they are editable [#636](https://github.com/umbraco/Umbraco.Forms.Issues/issues/636) -* Fix for incorrect validation of mandatory file upload fields [#110](https://github.com/umbraco/Umbraco.Forms.Issues/issues/110) - -**8.0.2, 8.1.6, 8.2.3, 8.3.4, 8.4.4, 8.5.7, 8.6.2, 8.7.6 (July 20th 2021)** - -* Resolution of a security vulnerability (see [blog post](https://umbraco.com/blog/security-advisory-20th-of-july-2021-patch-is-now-available/)). - -[**8.7.5**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=label%3Arelease%2F8.7.5+is%3Aclosed) **(July 6th 2021)** - -* Resolved JavaScript incompatibility issues with IE11 [#601](https://github.com/umbraco/Umbraco.Forms.Issues/issues/601) -* Fixed bug with sending static values in "Send to URL" workflow [#597](https://github.com/umbraco/Umbraco.Forms.Issues/issues/597) -* Displayed visual indicator of conditions applied to form groups [#590](https://github.com/umbraco/Umbraco.Forms.Issues/issues/590) -* Handled escaping of pre-values with apostrophes when used in conditions [#456](https://github.com/umbraco/Umbraco.Forms.Issues/issues/456) - -This change has required a minor amendment to the Script.cshtml partial view. So if you've modified this in your installation, don't copy over from the update. You should review it to ensure you apply the update. - -* Added script attributes to avoid incompatibility issues with vuejs [#311](https://github.com/umbraco/Umbraco.Forms.Issues/issues/311) -* Fixed reCAPTCHA v3 slider issue when the score threshold was set to the value of 0 -* Confirmed resolution of duplicate form name exception caused when copying forms [#425](https://github.com/umbraco/Umbraco.Forms.Issues/issues/425) - -[**8.7.4**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=label%3Arelease%2F8.7.4+is%3Aclosed) **(June 15th 2021)** - -* Resolved exception thrown when editing a form entry via an invalid ID or with an ID for a different form [#584](https://github.com/umbraco/Umbraco.Forms.Issues/issues/584) -* Fixed issue where editing a form entry with a deleted field generates an exception [#583](https://github.com/umbraco/Umbraco.Forms.Issues/issues/583) -* Fixed issue with non-active workflows being processed [#582](https://github.com/umbraco/Umbraco.Forms.Issues/issues/582) -* Fixed error triggered by a form containing no fields that store data [#580](https://github.com/umbraco/Umbraco.Forms.Issues/issues/580) -* Reduced level of log messages related to reCAPTCHA field type [#573](https://github.com/umbraco/Umbraco.Forms.Issues/issues/573) -* Resolved issue with the use of reCAPTCHA field type on multiple forms on the same page [#571](https://github.com/umbraco/Umbraco.Forms.Issues/issues/571) -* Resolved issue with copy form function when form storage configuration key is missing [#567](https://github.com/umbraco/Umbraco.Forms.Issues/issues/567) -* Resolved bug with backoffice data filter in non-English locales [#560](https://github.com/umbraco/Umbraco.Forms.Issues/issues/560) -* Removed use of obsolete methods in reCAPTCHA field type [#557](https://github.com/umbraco/Umbraco.Forms.Issues/issues/557) -* Added cache invalidation for member properties when used for "magic strings" [#534](https://github.com/umbraco/Umbraco.Forms.Issues/issues/534) - -[**8.7.3**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=label%3Arelease%2F8.7.3+is%3Aclosed) **(May 18th 2021)** - -* Fixed issue with migrations using SQL CE [#559](https://github.com/umbraco/Umbraco.Forms.Issues/issues/559) -* Aligned text field maxlength attribute with database field size [#563](https://github.com/umbraco/Umbraco.Forms.Issues/issues/563) -* Removed unnecessary rendering of validation framework requirement when form previewed in a rich text editor [#562](https://github.com/umbraco/Umbraco.Forms.Issues/issues/562) -* Optimized loading of form record counts in the backoffice dashboard [#561](https://github.com/umbraco/Umbraco.Forms.Issues/issues/561) -* Added support for multiple forms on one page using recaptchaV3 [#556](https://github.com/umbraco/Umbraco.Forms.Issues/issues/556) -* Resolved JavaScript console errors found on the backoffice security settings page [#505](https://github.com/umbraco/Umbraco.Forms.Issues/issues/505) -* Restored create datasource based on webservice functionality [#265](https://github.com/umbraco/Umbraco.Forms.Issues/issues/265) -* Resolved issue with save of uploaded files when a pre-populate event is registered [#177](https://github.com/umbraco/Umbraco.Forms.Issues/issues/177) - -[**8.7.2**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=label%3Arelease%2F8.7.2+is%3Aclosed) **(May 11th 2021)** - -* Style backoffice preview for Recaptcha3 field type [#552](https://github.com/umbraco/Umbraco.Forms.Issues/issues/552) -* Fixed issue with validation retained when answer type changed [#548](https://github.com/umbraco/Umbraco.Forms.Issues/issues/548) -* Fixed issue with previous button link in multi-page forms [#547](https://github.com/umbraco/Umbraco.Forms.Issues/issues/547) -* Fixed issue with save of text area number of rows setting [#544](https://github.com/umbraco/Umbraco.Forms.Issues/issues/544) -* Fixed issue with a copy of workflows when copying form, and added user selection for this operation [#543](https://github.com/umbraco/Umbraco.Forms.Issues/issues/543) -* Added placeholder to the date picker field type [#537](https://github.com/umbraco/Umbraco.Forms.Issues/issues/537) -* Fixed issue with Examine component registration [#535](https://github.com/umbraco/Umbraco.Forms.Issues/issues/535) -* Aligned styling of the delete button with core [#528](https://github.com/umbraco/Umbraco.Forms.Issues/issues/528) -* Updated styling of copy form dialog [#527](https://github.com/umbraco/Umbraco.Forms.Issues/issues/527) -* Updated styling of disabled add column button for form groups [#526](https://github.com/umbraco/Umbraco.Forms.Issues/issues/526) -* Added option for creating a multi-select select list [#473](https://github.com/umbraco/Umbraco.Forms.Issues/issues/473) -* Added missing default form setting configuration entry [#369](https://github.com/umbraco/Umbraco.Forms.Issues/issues/369) -* Made the body text component of the "title and description" field type a text area [#326](https://github.com/umbraco/Umbraco.Forms.Issues/issues/326) -* Fixed issue with conditional field rendering [#207](https://github.com/umbraco/Umbraco.Forms.Issues/issues/207) -* Removed some legacy, commented-out code from backoffice JavaScript [#148](https://github.com/umbraco/Umbraco.Forms.Issues/issues/148) - -[**8.7.1**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=label%3Arelease%2F8.7.1+is%3Aclosed) **(Apr 13th 2021)** - -* Resolves error loading form record totals in dashboard [#525](https://github.com/umbraco/Umbraco.Forms.Issues/issues/525) -* Resolves error with conditional form fields [#531](https://github.com/umbraco/Umbraco.Forms.Issues/issues/531) - -[**8.7.0**](https://github.com/umbraco/Umbraco.Forms.Issues/issues?q=label%3Arelease%2F8.7.0+is%3Aclosed) **(Apr 6th 2021)** - -* Addition of database integrity constraints and introduction of healthcheck for verification [#475](https://github.com/umbraco/Umbraco.Forms.Issues/issues/475) -* Created a new Recaptcha3 field type [#455](https://github.com/umbraco/Umbraco.Forms.Issues/issues/455) -* Added a new Slack workflow type using the currently supported method for integration [#482](https://github.com/umbraco/Umbraco.Forms.Issues/issues/482) -* Configuration of file upload to support single or multiple file uploads, and fixed validation to ensure that all files uploaded are checked for permitted file extensions [#499](https://github.com/umbraco/Umbraco.Forms.Issues/issues/499) -* Added configuration to remove the automatic addition of the data consent field if it’s not required [#318](https://github.com/umbraco/Umbraco.Forms.Issues/issues/318) -* Support editing of prevalues (without having to delete and re-add) [#193](https://github.com/umbraco/Umbraco.Forms.Issues/issues/193) -* Added additional properties to the view model used for the Razor email workflow, allowing reference to the page URL, form name, and submitted date [#379](https://github.com/umbraco/Umbraco.Forms.Issues/issues/379) -* Improved performance of form rendering by avoidance of the use of IContentService [#400](https://github.com/umbraco/Umbraco.Forms.Issues/issues/400) -* Copying of form fields [#200](https://github.com/umbraco/Umbraco.Forms.Issues/issues/200) -* Copying of form field groups [#324](https://github.com/umbraco/Umbraco.Forms.Issues/issues/324) -* Add links from form picker through to form edit and entries screens [#368](https://github.com/umbraco/Umbraco.Forms.Issues/issues/368) -* Added support for “magic string” replacement in settings (in particular, the “accept” copy in the data content field type) [#242](https://github.com/umbraco/Umbraco.Forms.Issues/issues/242) -* Add options for CC and BCC addresses in workflow emails [#457](https://github.com/umbraco/Umbraco.Forms.Issues/issues/457) -* Added configuration for the number of rows to render the long answer text area field [#113](https://github.com/umbraco/Umbraco.Forms.Issues/issues/113) -* Removed “approve” actions when they aren’t relevant for a form [#304](https://github.com/umbraco/Umbraco.Forms.Issues/issues/304) -* Tightened email address validation [#474](https://github.com/umbraco/Umbraco.Forms.Issues/issues/474) -* Added styling indicating when a workflow is inactive [#464](https://github.com/umbraco/Umbraco.Forms.Issues/issues/464) -* Fixed error with saving of datasource [#497](https://github.com/umbraco/Umbraco.Forms.Issues/issues/497) -* Fixed error with creating a new form with duplicate aliases [#172](https://github.com/umbraco/Umbraco.Forms.Issues/issues/172) -* Ensured field settings are validated server-side when fields are added to forms [#433](https://github.com/umbraco/Umbraco.Forms.Issues/issues/433) -* Resolved an incorrect namespace [#488](https://github.com/umbraco/Umbraco.Forms.Issues/issues/488) -* Ensured mandatory radio buttons are validated client-side [#487](https://github.com/umbraco/Umbraco.Forms.Issues/issues/487) -* Ensured currently configured media system is used for email attachments [#477](https://github.com/umbraco/Umbraco.Forms.Issues/issues/477) -* Removed erroneous email send logging [#439](https://github.com/umbraco/Umbraco.Forms.Issues/issues/439) -* Ensured that values changed in custom workflows are retained [#431](https://github.com/umbraco/Umbraco.Forms.Issues/issues/431) -* Added support to the save as Umbraco node workflow to be able to save to properties defined on a composition [#463](https://github.com/umbraco/Umbraco.Forms.Issues/issues/463) -* Removed (unnecessary but broken) reload button from form entries -* Fixed issue with the selection of XSLT file in Razor email workflow [#348](https://github.com/umbraco/Umbraco.Forms.Issues/issues/348) -* Fixed issues with saving all fields in the field mapper [#350](https://github.com/umbraco/Umbraco.Forms.Issues/issues/350) and [#414](https://github.com/umbraco/Umbraco.Forms.Issues/issues/414) -* Ensured that a copied form has newly generated unique Ids for field [#476](https://github.com/umbraco/Umbraco.Forms.Issues/issues/476) -* Fixed issue with saving a workflow as inactive. -* Fixed issue where “message on submit” for a form gets cleared after editing workflows [#502](https://github.com/umbraco/Umbraco.Forms.Issues/issues/502) -* Tidied up field re-ordering interface. -* Aligned check and radio button rendering with CMS [#382](https://github.com/umbraco/Umbraco.Forms.Issues/issues/382) -* Render placeholders in field previews [#483](https://github.com/umbraco/Umbraco.Forms.Issues/issues/483) -* Workflow picker and form create dialog styling tidy up [#303](https://github.com/umbraco/Umbraco.Forms.Issues/issues/303) -* Replaced use of standard JavaScript confirmation for deletes with Umbraco standard overlay or confirmation prompts [#197](https://github.com/umbraco/Umbraco.Forms.Issues/issues/197) -* Tidied up styling on the prevalues editor [#218](https://github.com/umbraco/Umbraco.Forms.Issues/issues/218) -* Tidied up styling on the form entry screen [#135](https://github.com/umbraco/Umbraco.Forms.Issues/issues/135) -* Tidied up styling on the form picker [#219](https://github.com/umbraco/Umbraco.Forms.Issues/issues/219) -* Tidied up styling on the form security page [#380](https://github.com/umbraco/Umbraco.Forms.Issues/issues/380) -* Better error messaging on unsupported migrations [#455](https://github.com/umbraco/Umbraco.Forms.Issues/issues/455) -* Use the range slider component in reCAPTCHA v3 [#507](https://github.com/umbraco/Umbraco.Forms.Issues/issues/507) -* Use toggle for enabled/disabled settings [#508](https://github.com/umbraco/Umbraco.Forms.Issues/issues/508) -* Ensure overlays close with Esc key [#509](https://github.com/umbraco/Umbraco.Forms.Issues/issues/509) -* Aligned caret in conditions overlay [#510](https://github.com/umbraco/Umbraco.Forms.Issues/issues/510) -* Removed use of turquoise color [#511](https://github.com/umbraco/Umbraco.Forms.Issues/issues/511) -* Added clear line between conditions [#512](https://github.com/umbraco/Umbraco.Forms.Issues/issues/512) -* Prevented addition of empty file extension on file upload [#516](https://github.com/umbraco/Umbraco.Forms.Issues/issues/516) -* Improved UI for file upload types [#517](https://github.com/umbraco/Umbraco.Forms.Issues/issues/517) -* Prevented password managers acting on form group and page name fields [#518](https://github.com/umbraco/Umbraco.Forms.Issues/issues/518) -* Updated styling on re-order button [#519](https://github.com/umbraco/Umbraco.Forms.Issues/issues/519) -* Set upper limit on the number of columns in form group [#520](https://github.com/umbraco/Umbraco.Forms.Issues/issues/520) -* Updated reCAPTCHA v3 to function on submit buttons as well as inputs [#521](https://github.com/umbraco/Umbraco.Forms.Issues/issues/521) -* Sanitize for field names when the sort option is provided in the backoffice record filter request. -* Applied fix for an issue with conditionals that are not on the first page [#462](https://github.com/umbraco/Umbraco.Forms.Issues/issues/462) -* Resolved issues with conditional logic - [#273](https://github.com/umbraco/Umbraco.Forms.Issues/issues/273) and [#522](https://github.com/umbraco/Umbraco.Forms.Issues/issues/522) - -Breaking changes: - -* In introducing CC and BCC email addresses for workflow-based email sending (#457), we've needed to add a new method to _IWorkflowEmailService_. If anyone has a custom implementation of this interface, it will need to be amended to implement this new method. - -
- -## Legacy release notes - -You can find the release notes for versions out of support in the [Legacy documentation on GitHub](https://github.com/umbraco/UmbracoDocs/blob/umbraco-eol-versions/11/umbraco-forms/release-notes.md) and [Umbraco Forms Package page](https://our.umbraco.com/packages/developer-tools/umbraco-forms/). diff --git a/10/umbraco-forms/upgrading/manualupgrade.md b/10/umbraco-forms/upgrading/manualupgrade.md deleted file mode 100644 index 428d0676dc6..00000000000 --- a/10/umbraco-forms/upgrading/manualupgrade.md +++ /dev/null @@ -1,33 +0,0 @@ -# Manually Upgrading Umbraco Forms - -This article shows how to manually upgrade Umbraco Forms to run the latest version. - -When upgrading Umbraco Forms, be sure to also consult the [version specific upgrade notes](version-specific.md) to learn about potential breaking changes and common pitfalls. - -## Get the latest version of Umbraco Forms - -To get the latest version of Umbraco Forms, you can upgrade using: - -* [NuGet](manualupgrade.md#nuget) -* [Visual Studio](manualupgrade.md#visual-studio) - -### NuGet - -* NuGet installs the latest version of the package when you use the `dotnet add package Umbraco.Forms` command unless you specify a package version: `dotnet add package Umbraco.Forms --version ` -* After you have added a package reference to your project by executing the `dotnet add package Umbraco.Forms` command in the directory that contains your project file, run `dotnet restore` to install the package. - -### Visual Studio - -1. Go to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution...` in Visual Studio, to upgrade your Forms: -2. Select **Umbraco.Forms**. -3. Select the latest version from the **Version** drop-down and click **Install**. - -![NuGet Package Manager](../installation/images/Manage_packages_v10.png) - -4. When the command completes, open the **.csproj** file to make sure the package reference is updated: - - ```xml - - - - ``` diff --git a/10/umbraco-forms/upgrading/migration-ids.md b/10/umbraco-forms/upgrading/migration-ids.md deleted file mode 100644 index 1f2f38f0f35..00000000000 --- a/10/umbraco-forms/upgrading/migration-ids.md +++ /dev/null @@ -1,12 +0,0 @@ -# Migration IDs - -A unique **migration ID** is generated for each Umbraco Forms upgrade that requires a migration. The migration IDs are all listed in this article. - -| Migration ID | Introduced In Version | Description | -| ------------------------------------ | --------------------- | ---------------------------------------------------------------------------- | -| 7c7bc5ee-4c5b-42dc-9576-5ce6dfbddb8e | 10.0.0 | Installs Umbraco Forms. | -| 9f7e6fe6-bbd5-4b2b-8820-e9e0e36cc74c | 10.1.0 | Adds Culture column to Records table. | -| 1a8f0d04-9396-40a2-9423-39fc9ae3828f | 10.1.0 | Adds a Record Workflow Audit table. | -| 6e692c5d-c670-4c34-af17-28d8dbf0dcd2 | 10.1.0 | Adds an ExecutionStage column to the Record Workflow Audit table. | -| 5d84fee1-388c-4e5f-b98c-1e66947278f1 | 10.1.0 | No operation migration. | -| 22df962a-ae26-4bdd-b8fd-0513a9c636bf | 10.5.2 | Ensures the presence of an index on the FolderKey column in the Forms table. | diff --git a/10/umbraco-forms/upgrading/version-specific.md b/10/umbraco-forms/upgrading/version-specific.md deleted file mode 100644 index 20f2e09c198..00000000000 --- a/10/umbraco-forms/upgrading/version-specific.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -description: >- - Version specific documentation for upgrading to new major versions of Umbraco - Forms. ---- - -# Version Specific Upgrade Notes - -This page covers specific upgrade documentation for when migrating to major 8 and 10 of Umbraco Forms. - -{% hint style="info" %} -If you are upgrading to a new minor or patch version, you can find information about the breaking changes in the [Release Notes](../release-notes.md) article. -{% endhint %} - -## Version Specific Upgrade Notes History - -
- -Version 10.1 - -**Breaking changes** - -* The default theme has been updated to render captions for field types that support prevalues. If you have created any custom themes, please review the default theme and ensure you make similar changes to make use of the new feature. -* The method `PreValues` on the `FieldViewModel` type has been changed from a collection of strings to a collection of a `PrevalueViewModel` object that has a Value and Caption property. -* In order to fix an issue with display and editing of values, we've found a need to ensure the property representing the fields a record entry used in the backoffice is changed from a list of values to a structure containing the field Ids and values. Specifically, `EntrySearchResult.Fields` has changed type `IEnumerable` to `IEnumerable`. The only scenarios affected by this would be anyone handling the `EntrySearchResultFetchingNotification` notification or developing custom export types. - -
- -
- -Version 10 - -Version 10 of Umbraco Forms has a minimum dependency on Umbraco CMS core of `10.0.0`. It runs on .NET 6. - -To migrate to version 10, you should first update to the latest minor release of version 9. If you are upgrading from Umbraco 8, update Forms to the latest minor version of Forms 8. Ensure you have the configuration in place for storing form definitions in the database. For more information, see the [Umbraco Forms in the Database (legacy)](https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Forms-in-the-Database/) article. - -Either way will ensure you have all the database schema changes in place. - -**Views and client-side files** - -Umbraco 10 distributes the views and client-side files as part of a Razor class library, distributed in the Umbraco.Forms.StaticAssets package. This means these assets are no longer individual files available on disk. The advantage of this approach is that that avoids changes made to them by solution developers being inadvertently lost when the project is rebuilt. - -When upgrading from Forms 9, you should either first run a `dotnet clean`, or, after installing Forms 10, delete the `App_Plugins/UmbracoForms` folder. This will ensure there aren't two copies of the `package.manifest` file, which would cause issues by registering duplicate property editors. - -For views you should also remove the following folders and files (again, either via a `dotnet clean` before upgrading, or manually afterward): - -* `/Views/MacroPartials/InsertUmbracoFormWithTheme.cshtml` -* `/Views/MacroPartials/RenderUmbracoFormScripts.cshtml` -* `/Views/Partials/Forms/` - -If you have custom themes or other changes to the files in the `Views/Partials/Forms` folder, you should ensure those files remain. - -For example, with a custom email template, remove the file `Example-Template.cshtml` from the `/Views/Forms/Emails` folder but keep any custom templates. - -Similarly, if you have a custom theme, remove the `default` and `bootstrap3-horizontal` folders from the `/Views/Partials/Forms/Themes/` folder but keep any custom theme folders. - -**Breaking changes** - -Version 10 contains a number of breaking changes. We do not expect many projects to be affected by them as they are in areas that are not typical extension points. For reference though, the full details are listed here. - -**Configuration** - -* Renamed the configuration option to allow editable form submissions on the front-end to `AllowEditableFormSubmissions` (fixing the typo in the previous value of `AllowEditableFormSubmissions`). - -**Code** - -* `DatabaseIntegrityHealthCheck` has an altered constructor taking an additional parameter. -* The `EventExtensions` class is no longer used since V9 and has been removed. -* Static events from `BaseFileStorage` removed and replaced with notifications. -* `IFormTemplateStorage` along with its implementation in `FormTemplateStorage` and base classes have been simplified, as templates are the only file based storage now in use, and there are no methods necessary for this other than reading. -* The method `GetScaffold` has been removed from `FormController`, as it's not called from the UI. -* The following classes have altered constructors taking additional parameters, with obsolete versions removed. - * `RecordController` - * `FormSecurityController` - * `FormSecurityTreeController` - * `PostToUrl` - * `WorkflowEmailService` -* The public fields on the `Setting` class have been converted to properties. -* The methods `GetMemberCacheKey` and `GetMemberValuesCacheKey` on `CacheKeys` taking an integer parameter have been removed. -* The method `GetUserSecurity` on `IUserSecurityStorage` has been amended to take an integer parameter rather than an object. -* The method `StringExtensions.DetectIsJson` has been removed (the equivalent exists in CMS). -* Obsoleted methods in `FieldConditionEvaluation` have been removed. -* The following unused classes have been removed: - * `FormEventArgs` - * `FolderEventArgs` - * `FieldPreValueSourceEventArgs` - * `FormDataSourceEventArgs` - * `WorkflowEventArgs` - * `BaseStorageEventArgs` Additional methods have been added to the following interfaces: - * `IRecordStorage` - * `IRecordFieldValueStorage` - * `IUserSecurityStorage` - * `IUserFormSecurityStorage` - * `IFormsSecurity` -* Additional properties of `SupportsMandatory` and `EditType` have been added to the `IFieldType` interface. -* The obsoleted method `RegenerateFieldSetAndFieldIds` on `Form` has been removed. -* The constructor of `FolderNotificationHandler` had an unused parameter removed. -* The obsolete and unused methods `CanCurrentUserEdit`, `CanCurrentUserAddInEditor`, `CanCurrentUserManageWorkflows`, `EnsureUserExist`s and `CanCurrentUserExport` were removed from the `IFormSecurity` interface. -* The type parameter `TEventArgs` defined on `IBaseService` (and derived interfaces) has been removed. -* Database migration classes inheriting from `FormsMigrationBase` now use the non-obsolete base constructor defined on `PackageMigrationBase`. -* The methods on `IPlaceholderParsingService` have been combined into a single one with optional parameters. -* The method `PostSave` on `FormSecurityController` has been renamed to `PostSaveForUser`. -* The backoffice model class `FormSecurity` has been renamed to `FormSecurityForUser`. -* The unused class `NonSerialiazableTypeSurrogateSelector` was removed. -* The unused method `ImportXmlNodeFromText` on `XmlHelper` was removed. -* `IFormService.FormExist` was renamed to `IFormService.FormExists`. -* `EntrySearchResultCollection.schema` was capitalized. -* Base class `ExportType` has a constructor taking `IHostEnvironment` instead of `IHostingEnvironment`. -* Typo was fixed in the class name of `TempDataDictionraryExtensions`. -* The `SetFormThemeCssFile` extension method had an unused variable removed. -* Some method signatures have had appropriate modifications for nullable reference type support. -* Removed `BaseFileStorage`, `BaseFileSystemStorage` and `FormsFileSystemForPackageData` as they are no longer needed following changes to support distribution of assets in a razor class library. - -
- -
- -Version 8.13 - -See notes under 10.1. - -
- -
- -Version 8 - -Version 8 of Umbraco Forms has a minimum dependency on Umbraco CMS core of `8.0.0` and runs on .NET Framework 7.2. - -In order to upgrade from Umbraco Forms 7 to Umbraco Forms 8, you can use any of these options: - -**Download** - -In order to upgrade you will want to [download the version of Forms you wish to upgrade to](https://our.umbraco.com/projects/developer-tools/umbraco-forms/). Instead of downloading the actual package, however, you want to download the `Umbraco.Forms.Files.x.y.z.zip` file (where x.y.z) is the version. - -The filename ends with `.Files.x.y.z.zip` and contains only the files that get installed when you install Umbraco Forms. - -**Copy** - -The easiest way to proceed is to unzip the file you downloaded and copy and overwrite (almost) everything into your website. Almost, because you might not want to overwrite `~/App_Plugins/UmbracoForms/UmbracoForms.config` because you might have updated it in the past. Make sure to compare your current version to the version in the zip file you downloaded. If there's any new configuration options in there then copy those into your website's `UmbracoForms.config` file. - -
- -## Legacy version specific upgrade notes - -You can find the version specific upgrade notes for versions out of support in the [Legacy documentation on GitHub](https://github.com/umbraco/UmbracoDocs/blob/umbraco-eol-versions/11/umbraco-forms/installation/version-specific.md). diff --git a/10/umbraco-ui-builder/.gitbook.yaml b/10/umbraco-ui-builder/.gitbook.yaml deleted file mode 100644 index 3f8fdbbc625..00000000000 --- a/10/umbraco-ui-builder/.gitbook.yaml +++ /dev/null @@ -1,12 +0,0 @@ -root: ./ - -​structure: - readme: README.md - summary: SUMMARY.md - -redirects: - getting-started/upgrading/README: upgrading/upgrade.md - getting-started/upgrading/version-specific-upgrades: upgrading/version-specific.md - getting-started/installation: installation/installation.md - getting-started/licensing-model: installation/licensing-model.md - guides/migrating-from-konstrukt-to-umbraco-ui-builder: upgrading/migrating-from-konstrukt-to-umbraco-ui-builder.md diff --git a/10/umbraco-ui-builder/README.md b/10/umbraco-ui-builder/README.md deleted file mode 100644 index fc13e9cb26e..00000000000 --- a/10/umbraco-ui-builder/README.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -description: Documentation for Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Umbraco UI Builder Documentation - -Umbraco UI Builder is the Umbraco v10+ backoffice UI builder for custom data structures configured via a fluent API. - -![Example Umbraco UI Builder UI](images/comments_listview.png) - -If you have a custom data store that you want to content manage from within Umbraco, then you can use Umbraco UI Builder. With some lines of code, you can configure a custom administration UI, and reuse many core components with a consistent look and feel. - -With Umbraco UI Builder, custom backoffice integrations can now take a matter of minutes, rather than days. - -## Using the Documentation - -**This documentation is aimed at developers** who have at least a basic understanding of Umbraco, as well as C#/MVC principles. - -If you are new to Umbraco UI Builder, it is recommended that you start by taking a look at the [Getting Started](./getting-started/overview.md) section. This provides details on the system requirements and how to install Umbraco UI Builder. - -Once you have Umbraco UI Builder installed and are wondering "What next?" then you'll want to take a look at the [Guides](./guides/creating-your-first-integration.md) section. This provides a quick-start example of how to configure Umbraco UI Builder. - -Use the main menu to dive deeper into Umbraco UI Builder and get to know all of its features in detail. You can then jump to the specific topic you are interested in to find out more. - -Finally, for all other resources/useful information you can head over to the [Miscellaneous](./miscellaneous/conventions.md) section. - -## Getting Help - -If you require assistance you can use our support channels to seek assistance. diff --git a/10/umbraco-ui-builder/SUMMARY.md b/10/umbraco-ui-builder/SUMMARY.md deleted file mode 100644 index e28f1cfc113..00000000000 --- a/10/umbraco-ui-builder/SUMMARY.md +++ /dev/null @@ -1,90 +0,0 @@ -# Table of contents - -* [Umbraco UI Builder Documentation](README.md) -* [Known Issues](known-issues.md) -* [Release Notes](release-notes.md) - -## Installation - -* [Installing Umbraco UI Builder](installation/installation.md) -* [Licensing](installation/licensing-model.md) - -## Upgrading - -* [Upgrading Umbraco UI Builder](upgrading/upgrade.md) -* [Version Specific Upgrade Notes](upgrading/version-specific.md) -* [Migrate from Konstrukt to Umbraco UI Builder](upgrading/migrating-from-konstrukt-to-umbraco-ui-builder.md) - -## Getting Started - -* [Overview](getting-started/overview.md) -* [Configuration](getting-started/configuration.md) -* [User Interface](getting-started/user-interface.md) - -## How-to Guides - -* [Creating your first integration](guides/creating-your-first-integration.md) - -## Areas - -* [Overview](areas/overview.md) -* [Sections](areas/sections.md) - * [Summary Dashboards](areas/summary-dashboards.md) -* [Trees](areas/trees.md) - * [Folders](areas/folders.md) -* [Dashboards](areas/dashboards.md) -* [Context Apps](areas/context-apps.md) - -## Collections - -* [Overview](collections/overview.md) -* [The Basics](collections/the-basics.md) -* [List Views](collections/list-views.md) - * [Field Views](collections/field-views.md) -* [Editors](collections/editors.md) -* [Child Collections](collections/child-collections.md) - * [Child Collection Groups](collections/child-collection-groups.md) - -## Searching - -* [Overview](searching/overview.md) -* [Searchable Properties](searching/searchable-properties.md) - -## Filtering - -* [Overview](filtering/overview.md) -* [Global Filters](filtering/global-filters.md) -* [Data Views](filtering/data-views.md) - * [Data Views Builders](filtering/data-views-builders.md) -* [Filterable Properties](filtering/filterable-properties.md) - -## Actions - -* [Overview](actions/overview.md) -* [The Basics](actions/the-basics.md) -* [Action Visibility](actions/action-visibility.md) -* [Inbuilt Actions](actions/inbuilt-actions.md) - -## Cards - -* [Overview](cards/overview.md) -* [Count Cards](cards/count-cards.md) -* [Custom Cards](cards/custom-cards.md) - -## Property Editors - -* [Overview](property-editors/overview.md) -* [Entity Picker](property-editors/entity-picker.md) - -## Advanced - -* [Virtual Sub Trees](advanced/virtual-sub-trees.md) -* [Encrypted Properties](advanced/encrypted-properties.md) -* [Value Mappers](advanced/value-mappers.md) -* [Repositories](advanced/repositories.md) -* [Events](advanced/events.md) - -## Miscellaneous - -* [Conventions](miscellaneous/conventions.md) -* [Umbraco Aliases](miscellaneous/umbraco-aliases.md) diff --git a/10/umbraco-ui-builder/actions/action-visibility.md b/10/umbraco-ui-builder/actions/action-visibility.md deleted file mode 100644 index 99086bb89b4..00000000000 --- a/10/umbraco-ui-builder/actions/action-visibility.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -description: Controlling the visibility of actions in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Action Visibility - -By default actions are not visible in the UI and you must expressly define when and where an action should display. This can be achieved in two ways, either on the action definition itself or at the point of registration on the collections config. - -## Controlling the default action visibility - -To define the default visibility of an action at the action level you can do this by overriding the `IsVisible` method of the `Action<>` base class. - -````csharp -// Example -public class MyAction : Action -{ - ... - public override bool IsVisible(ActionVisibilityContext ctx) - { - return ctx.ActionType == ActionType.Bulk - || ctx.ActionType == ActionType.Row; - } - ... -} -```` - -The `IsVisible` method is passed a `ActionVisibilityContext` which you should use to decide whether the action should display, returning `true` if it should, or `false` if it should not. For more information check the [Action visibility context](#action-visibility-context). - -## Overriding an actions visibility - -Overriding an actions visibility is controlled via the [collections](../collections/overview.md) configuration. - -### **AddAction<TMenuActionType>(Lambda actionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds an action of the given type to the collection with the given visibility. - -````csharp -// Example -collectionConfig.AddAction(actionConfig => actionConfig - .SetVisibility(x => x.ActionType == ActionType.Bulk - || x.ActionType == ActionType.Row) -); -```` - -### **AddAction(Type actionType, Lambda actionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds an action of the given type to the collection with the given visibility. - -````csharp -// Example -collectionConfig.AddAction(typeof(ExportMenuAction), actionConfig => actionConfig - .SetVisibility(x => x.ActionType == ActionType.Bulk - || x.ActionType == ActionType.Row) -); -```` - -### **AddAction(IAction action, Lambda actionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds the given action to the collection with the given visibility. - -````csharp -// Example -collectionConfig.AddAction(action, actionConfig => actionConfig - .SetVisibility(x => x.ActionType == ActionType.Bulk - || x.ActionType == ActionType.Row) -); -```` - -## Action visibility context - -When controlling the visibility of an action you will be given a `ActionVisibilityContext` object from which you can decide whether to show the action or not. The visibility context contains two key pieces of information on which you can base this decision. - -### ActionType - -The action type property is an enum property that define which area of the UI it is that wishes to access this action. Enabling an action to display for a given action type will determine where an action is displayed. - -#### ContainerMenu - -The `ContainerMenu` action type determines that the action will be displayed in both the tree of the collection and its list view actions menu. - -![Container Menu](../images/container_actions_menu.png) - -#### EntityMenu - -The `EntityMenu` action type determines that the action will be displayed in the actions menu of a collection editor UI. - -![Entity Menu](../images/entity_actions_menu.png) - -#### Bulk - -The `Bulk` action type determines that the action will be displayed in the collection list view bulk actions menu. - -![Bulk Actions](../images/bulk_actions_menu.png) - -#### Row - -The `Row` action type determines that the action will be displayed in the collection list view action row menu. - -![Row Actions](../images/row_actions_menu.png) - -#### Save - -The `Save` action type determines that the action will be displayed as a sub button in an entity editors save button. All `Save` action types trigger a save before the action is executed and so to convey this, all `Save` action type button labels are prefixed `Save & [Action Name]` - -![Save Actions](../images/save_actions_menu.png) - -### UserGroups - -The user groups collection contains a list of Umbraco `IReadOnlyUserGroup` objects for the current logged-in backoffice user. This allows you to control the visibility of actions for given user group members. diff --git a/10/umbraco-ui-builder/actions/inbuilt-actions.md b/10/umbraco-ui-builder/actions/inbuilt-actions.md deleted file mode 100644 index 6a88bc85bb2..00000000000 --- a/10/umbraco-ui-builder/actions/inbuilt-actions.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -description: A list of inbuilt actions that come with Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Inbuilt Actions - -Umbraco UI Builder comes with some inbuilt actions that are available for you to use straight away. - -## ExportEntityAction - -**Namespace** Umbraco.UIBuilder.Infrastructure.Configuration.Actions - -Provides a Comma-Separated Values (CSV) export functionality converting all properties to column headings and rendering each entity property values on each row. - -## ImportEntityAction - -**Namespace** Umbraco.UIBuilder.Infrastructure.Configuration.Actions - -Provides a Comma-Separated Values (CSV) import functionality matching column headings with entity properties and mapping row values to an entity. diff --git a/10/umbraco-ui-builder/actions/overview.md b/10/umbraco-ui-builder/actions/overview.md deleted file mode 100644 index cf0369c2b15..00000000000 --- a/10/umbraco-ui-builder/actions/overview.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -description: Configuring actions in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Actions - -Actions provide an API to perform custom tasks against a collection and its entities from multiple locations in the UI. Examples: menu actions, bulk actions, or individual table row actions. - -![Bulk Actions UI](../images/bulk_actions.png) - -Get started with actions by learning about the basics. - -{% content-ref url="the-basics.md" %} -[the-basics.md](the-basics.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/actions/the-basics.md b/10/umbraco-ui-builder/actions/the-basics.md deleted file mode 100644 index 430a66c1a40..00000000000 --- a/10/umbraco-ui-builder/actions/the-basics.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -description: Configuring actions in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# The Basics - -Actions are a powerful way of adding custom functionality to Umbraco UI Builder without needing to create custom UI elements. By providing an action to run, Umbraco UI Builder can automatically trigger actions from a number of UI locations. - -## Defining an action - -To define an action create a class that inherits from the base class `Action<>` and configure it like below: - -````csharp -// Example -public class MyAction : Action -{ - public override string Icon => "icon-settings"; - public override string Alias => "myaction"; - public override string Name => "My Action"; - public override bool ConfirmAction => true; - - public override ActionResult Execute(string collectionAlias, object[] entityIds) - { - // Perform operation here... - } -} -```` - -The required configuration options are: - -* **Name:** The name of the action. -* **Alias:** A unique alias for the action. -* **Icon:** An icon to display next to the name in the action button. -* **Execute:** The method to run against a given list of entities. - -Additional optional configuration options are: - -* **ConfirmAction:** Set whether a confirm dialog should display before performing this action. - -The generic argument is a return type for the action. See [Controlling the action result](#controlling-the-action-result) below. - -{% hint style="info" %} -You can use dependency injection to inject any services you require to perform your specific task. When injecting dependencies, it's always recommended that you inject `Lazy` implementations of the required services to ensure they are only resolved when needed. -{% endhint %} - -## Controlling the action result - -Actions by default will return a `ActionResult` but you can return other types of result by swapping the `Action<>` generic argument. - -* **`ActionResult`** - Standard result with a boolean `Success` value. -* **`FileActionResult`** - Returns a file stream / bytes and triggers a download dialog. - -## Capturing settings for an action - -Sometimes you may need to collect further user input before you can perform an action. To achieve this you can use the `Action<>` base class that accepts an additional `TSetting` generic argument. - -````csharp -// Example -public class MyAction : Action -{ - public override string Icon => "icon-settings"; - public override string Alias => "myaction"; - public override string Name => "My Action"; - public override bool ConfirmAction => true; - - public override void Configure(SettingsConfigBuilder settingsConfig) - { - settingsConfig.AddFielset("General", fieldsetConfig => fieldsetConfig - .AddField(s => s.RecipientName).SetLabel("Recipient Name") - .AddField(s => s.RecipientEmail).SetLabel("Recipient Email")) - } - - public override ActionResult Execute(string collectionAlias, object[] entityIds, MyActionSettings settings) - { - // Perform operation here... - } -} - -public class MyActionSettings -{ - public string RecipientName { get; set; } - public string RecipientEmail { get; set; } -} -```` - -By implementing this base class you are required to implement an additional `Configure` method which accepts a `SettingsConfigBuilder<>` parameter. You should use this parameter calling the builders fluent API to define the settings dialog UI and how it maps to the settings type. With the settings config builder you are able to create fieldsets and fields with the same fluent API as defined in the [Collection Editors section](../collections/editors.md#adding-a-fieldset-to-a-tab). - -In addition to this `Configure` method, the `Execute` method will now accept an additional `settings` parameter of the settings type. This will be pre-populated by Umbraco UI Builder with the value entered by the user, allowing you to alter your actions behavior accordingly. - -## Adding an action to a collection - -Actions are added via the [Collections](../collections/overview.md) configuration. - -### **AddAction<TMenuActionType>() : CollectionConfigBuilder<TEntityType>** - -Adds an action of the given type to the collection. - -````csharp -// Example -collectionConfig.AddAction(); -```` - -#### **AddAction(Type actionType) : CollectionConfigBuilder<TEntityType>** - -Adds an action of the given type to the collection. - -````csharp -// Example -collectionConfig.AddAction(actionType); -```` - -#### **AddAction(IAction action) : CollectionConfigBuilder<TEntityType>** - -Adds the given action to the collection. - -````csharp -// Example -collectionConfig.AddAction(action); -```` diff --git a/10/umbraco-ui-builder/advanced/encrypted-properties.md b/10/umbraco-ui-builder/advanced/encrypted-properties.md deleted file mode 100644 index 7962111773b..00000000000 --- a/10/umbraco-ui-builder/advanced/encrypted-properties.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -description: Configuring encrypted properties in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Encrypted Properties - -If needed to collect sensitive information in a collection but don't want to persist in a plain text format to the data storage mechanism. Umbraco UI Builder can help with this by allowing you to define properties as encrypted. After which any time the value is persisted or retrieved from persistence, Umbraco UI Builder will automatically encrypt and decrypt the value. - -{% hint style="info" %} -Umbraco UI Builder uses the `IDataProtectionProvider` instance registered in the DI container to perform its encryption/decryption. If you need to change the encryption algorithm, you should replace the `IDataProtectionProvider` instance in the DI container. -{% endhint %} - -## Defining encrypted properties - -### **AddEncryptedProperty(Lambda encryptedPropertyExpression) : CollectionConfigBuilder<TEntityType>** - -Adds the given property to the encrypted properties collection. Property must be of type `String`. When set, the property will be encrypted/decrypted on write/read respectively. - -````csharp -// Example -collectionConfig.AddEncryptedProperty(p => p.Secret); -```` diff --git a/10/umbraco-ui-builder/advanced/events.md b/10/umbraco-ui-builder/advanced/events.md deleted file mode 100644 index e67aae38fe0..00000000000 --- a/10/umbraco-ui-builder/advanced/events.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -description: Configuring event handlers in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Events - -Umbraco UI Builder fires a number of notification events during regular operation to allow for extending of the default behaviour. - -## Registering event handlers - -Umbraco UI Builder uses the same [Notification Mechanism built into Umbraco v9+](../../umbraco-cms/fundamentals/code/subscribing-to-notifications.md) and so uses the same registration process. First you will need to define a notification event handler for the event you wish to handle like below: - -```csharp -public class MyEntitySavingEventHandler : INotificationHandler { - - public void Handle(ContentPublishedNotification notification) - { - // Handle the event here - } - -} -``` - -Then register your event handler in the `ConfigureServices` method of your `Startup.cs` file like below: - -```csharp -public void ConfigureServices(IServiceCollection services) -{ - services.AddUmbraco(_env, _config) - .AddBackOffice() - .AddWebsite() - .AddComposers() - .AddNotificationHandler() - .Build(); - -} -``` - -## Repository events - -### **EntitySavingNotification** - -Raised when the repository `Save` method is called and before the entity has been persisted. The notification contains an `Entity` property with `Before` and `After` inner properties. These properties provide access to a copy of the currently persisted entity (or null if a new entity) and the updated entity that´s saved. -Changes can be made to the `After` entity and they will be persisted as part of the save operation. If the `Cancel` property of the notification is set to `true` then the save operation will be canceled and no changes will be saved. - -````csharp -// Example -public class MyEntitySavingEventHandler : INotificationHandler { - - public void Handle(EntitySavingNotification notification) - { - var person = notification.Entity.After as Person; - if (person != null){ - ... - } - } - -} -```` - -### **EntitySavedNotification** - -Raised when the repository `Save` method is called and after the entity has been persisted. The notification contains an `Entity` property with `Before` and `After` inner properties. These properties provide access to a copy of the previously persisted entity (or null if a new entity) and the updated entity that´s saved. - -````csharp -// Example -public class MyEntitySavedEventHandler : INotificationHandler { - - public void Handle(EntitySavedNotification notification) - { - var person = notification.Entity.After as Person; - if (person != null){ - ... - } - } - -} -```` - -### **EntityDeletingNotification** - -Raised when the repository `Delete` method is called and **before** the entity is deleted. The notification contains an `Entity` property providing access to a copy of the entity about to be deleted. If the `Cancel` property of notification is set to `true` then the delete operation will be cancelled and entity won't be deleted. - -````csharp -// Example -public class MyEntityDeletingEventHandler : INotificationHandler { - - public void Handle(EntityDeletingNotification notification) - { - var person = notification.Entity.After as Person; - if (person != null){ - ... - } - } - -} -```` - -### **EntityDeletedNotification** - -Raised when the repository `Delete` method is called and **after** the entity has been deleted. The notification contains an `Entity` property providing access to a copy of the entity that´s deleted. - -````csharp -// Example -public class MyEntityDeletedEventHandler : INotificationHandler { - - public void Handle(EntityDeletedNotification notification) - { - var person = notification.Entity.After as Person; - if (person != null){ - ... - } - } - -} -```` - -### **SqlQueryBuildingNotification** - -Raised when the repository is **preparing** a SQL query. The notification contains the collection alias + type, the NPoco `Sql` object, and the where clause/order by clauses. These will be used to generate the SQL query. - -````csharp -// Example -public class MySqlQueryBuildingEventHandler : INotificationHandler { - - public void Handle(SqlQueryBuildingNotification notification) - { - notification.Sql = notification.Sql.Append("WHERE MyId = @0", 1); - } - -} -```` - -### **SqlQueryBuiltNotification** - -Raised when the repository has **repaired** a SQL query. The notification contains the collection alias + type, the NPoco `Sql` object and the where clause/order by clauses that was used to generate the SQL query. - -````csharp -// Example -public class MySqlQueryBuiltEventHandler : INotificationHandler { - - public void Handle(SqlQueryBuiltNotification notification) - { - notification.Sql = notification.Sql.Append("WHERE MyId = @0", 1); - } - -} -```` diff --git a/10/umbraco-ui-builder/advanced/repositories.md b/10/umbraco-ui-builder/advanced/repositories.md deleted file mode 100644 index a460ef49b59..00000000000 --- a/10/umbraco-ui-builder/advanced/repositories.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -description: Configuring repositories in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Repositories - -Repositories are used by Umbraco UI Builder to access the entity data stores. By default, collections will use a generic built-in NPoco repository. However, you can define your own repository implementation should you wish to store your entities via an alternative strategy. - -## Defining a repository - -To define a repository create a class that inherits from the base class `Repository` and implements all of its abstract methods. - -````csharp -// Example -public class PersonRepository : Repository { - - public PersonRepository(RepositoryContext context) - : base(context) - { } - - protected override int GetIdImpl(Person entity) { - return entity.Id; - } - - protected override Person GetImpl(int id) { - ... - } - - protected override Person SaveImpl(Person entity) { - ... - } - - protected override void DeleteImpl(int id) { - ... - } - - protected override IEnumerable GetAllImpl(Expression> whereClause, Expression> orderBy, SortDirection orderByDirection) { - ... - } - - protected override PagedResult GetPagedImpl(int pageNumber, int pageSize, Expression> whereClause, Expression> orderBy, SortDirection orderByDirection) { - ... - } - - protected override long GetCountImpl(Expression> whereClause) { - ... - } -} -```` - -**Note:** For all `Impl` methods there are public alternatives without the `Impl` suffix. However, there are separate implementation methods in order to ensure all repositories fire the relevant Umbraco UI Builder events. This is whether triggered via the Umbraco UI Builder's UI or not. - -## Changing the repository implementation of a collection - -### **SetRepositoryType<TRepositoryType>() : CollectionConfigBuilder<TEntityType>** - -Sets the repository type to the given type for the current collection. - -````csharp -// Example -collectionConfig.SetRepositoryType(); -```` - -### **SetRepositoryType(Type repositoryType) : CollectionConfigBuilder<TEntityType>** - -Sets the repository type to the given type for the current collection. - -````csharp -// Example -collectionConfig.SetRepositoryType(typeof(PersonRepositoryType)); -```` - -## Accessing a repository in code - -To help with accessing a repository (default or custom) Umbraco UI Builder has an `IRepositoryFactory` you can inject into your code base. This includes a couple of factory methods to create the repository instances for you. -Repositories should only be created via the repository factory as there are some injected dependencies that can only be resolved by Umbraco UI Builder. - -### **IRepositoryFactory.GetRepository<TEntity, TId>() : Repository<TEntity, TId>** - -Creates a repository for the given entity type. Umbraco UI Builder will search the configuration for the first section/collection with a configuration for the given entity type. Then it will use that as a repository configuration. - -````csharp -// Example -public class MyController : Controller -{ - private readonly Repository _repo; - - public MyController(IRepositoryFactory repoFactory) - { - _repo = repoFactory.GetRepository(); - } -} -```` - -### **IRepositoryFactory.GetRepository<TEntity, TId>(string collectionAlias) : Repository<TEntity, TId>** - -Creates a repository for the given entity type from the collection with the given alias. - -````csharp -// Example -public class MyController : Controller -{ - private readonly Repository _repo; - - public MyController(IRepositoryFactory repoFactory) - { - _repo = repoFactory.GetRepository("person"); - } -} -```` diff --git a/10/umbraco-ui-builder/advanced/value-mappers.md b/10/umbraco-ui-builder/advanced/value-mappers.md deleted file mode 100644 index e49f44aadd7..00000000000 --- a/10/umbraco-ui-builder/advanced/value-mappers.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -description: Configuring value mappers in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Value Mappers - -A value mapper is an Umbraco UI Builder helper class that sits between the editor UI and the database. It also lets you tweak the stored value of a field. By default Umbraco UI Builder will save a datatype value as it would be stored in Umbraco. Value mappers let you change this. - -When Umbraco UI Builder resolves a value mapper it will attempt to do so from the global DI container. This means you can inject any dependencies that you require for your mapper. If there is no type defined in the DI container, Umbraco UI Builder will fall-back to manually instantiating a new instance of value mapper. - -## Defining a value mapper - -To define a mapper create a class that inherits from the base class `ValueMapper` and implements the methods `EditorToModel` and `ModelToEditor`. - -````csharp -// Example -public class MyValueMapper : ValueMapper -{ - public override object EditorToModel(object input) - { - // Tweak the input and return mapped object - ... - } - - public override object ModelToEditor(object input) - { - // Tweak the input and return mapped object - ... - } -} -```` - -## Setting a field value mapper - -Value mappers are defined as part of a collection editor field configuration. - -### **SetValueMapper<TMapperType>() : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Set the value mapper for the current field. - -````csharp -// Example -fieldConfig.SetValueMapper(); -```` - -### **SetValueMapper(Type mapperType) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Set the value mapper for the current field. - -````csharp -// Example -fieldConfig.SetValueMapper(typeof(MyValueMapper)); -```` - -### **SetValueMapper(Mapper mapper) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Set the value mapper for the current field. - -````csharp -// Example -fieldConfig.SetValueMapper(new MyValueMapper()); -```` diff --git a/10/umbraco-ui-builder/advanced/virtual-sub-trees.md b/10/umbraco-ui-builder/advanced/virtual-sub-trees.md deleted file mode 100644 index b1f06370f2c..00000000000 --- a/10/umbraco-ui-builder/advanced/virtual-sub-trees.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -description: Configuring virtual sub trees in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Virtual SubTrees - -Virtual subtrees are a powerful feature that allows you to inject an Umbraco UI Builder tree structure into another Umbraco tree at a desired location. Thus acting as child nodes to the node chosen as the injection point. With virtual subtrees it allows you to extend built in or even 3rd party package trees with additional features. An example could be developing a "loyalty point" program for your e-commerce site and injecting the related database tables into a Vendr store tree. This allows the management of the program in its most logical location. - -![Example virtual sub tree injected into a Vendr store tree](../images/virtual-sub-tree.png) - -## Defining virtual SubTrees - -You define a virtual subtree by calling one of the `AddVirtualSubTree` methods of a [`WithTreeConfigBuilder`](../areas/trees.md#extending-an-existing-tree) instance. - -### **AddVirtualSubTree(string sectionAlias, string treeAlias, Lambda visibilityExpression, Lambda virtualSubTreeConfig = null) : VirtualSubTreeConfigBuilder** - -Adds a virtual subtree to the current tree with its visibility controlled via the visibility expression. - -````csharp -// Example -withTreeConfig.AddVirtualSubTree(ctx => ctx.Source.Id == 1056, contextAppConfig => { - ... -}); -```` - -### **AddVirtualSubTreeBefore(string sectionAlias, string treeAlias, Lambda visibilityExpression, Lambda matchExpression, Lambda virtualSubTreeConfig = null) : VirtualSubTreeConfigBuilder** - -Adds a virtual subtree to the current tree, **before** the tree node matches the match expression, with its visibility controlled via the visibility expression. - -````csharp -// Example -withTreeConfig.AddVirtualSubTreeBefore(ctx => ctx.Source.Id == 1056, treeNode => treeNode.Name == "Settings", contextAppConfig => { - ... -}); -```` - -### **AddVirtualSubTreeAfter(string sectionAlias, string treeAlias, Lambda visibilityExpression, Lambda matchExpression, Lambda virtualSubTreeConfig = null) : VirtualSubTreeConfigBuilder** - -Adds a virtual subtree to the current tree, **after** the tree node matches the match expression, with its visibility controlled via the visibility expression. - -````csharp -// Example -withTreeConfig.AddVirtualSubTreeAfter(ctx => ctx.Source.Id == 1056, treeNode => treeNode.Name == "Settings", contextAppConfig => { - ... -}); -```` - -## Controlling where to inject the Virtual SubTrees - -Controlling where a virtual subtree is injected is done via the visibility expression passed to one of the `AddVirtualSubTree` methods on the root `UIBuilderConfigBuilder` instance. Without a visibility expression, Umbraco UI Builder would inject the virtual subtree under every node in the given tree. This expression can be used to identify the exact location where our tree should go. - -To help with this, the visibility expression is passed a single `VirtualSubTreeFilterContext` argument with relevant contextual information. This information is about the current node being rendered, alongside a list of the current user's user groups for permission-based visibility control. It also includes access to an `IServiceProvider` in case you need to resolve a service to determine the correct node to inject below. - -````csharp -public class VirtualSubTreeFilterContext -{ - public NodeContext Source { get; } - public IEnumerable UserGroups { get; } - public IServiceProvider ServiceProvider { get; } -} - -public class NodeContext -{ - public string Id { get; } - public string TreeAlias { get; } - public string SectionAlias { get; } - public FormCollection QueryString { get; } -} -```` - -Below you can find an example of a more complex filter expression where injection is based on the Document Type of a content node: - -````csharp -withTreeConfig.AddVirtualSubTree(ctx => - { - using var umbracoContextRef = ctx.ServiceProvider.GetRequiredService().EnsureUmbracoContext(); - - if (!int.TryParse(ctx.Source.Id, out int id)) - return false; - - return (umbracoContextRef.UmbracoContext.Content.GetById(id)?.ContentType.Alias ?? "") == "textPage"; - }, - virtualNodeConfig => virtualNodeConfig - ... -); -```` - -## Controlling the position of the injected Virtual SubTrees - -The position of a virtual subtree within the child nodes of the injection node is controlled by using one of the `AddVirtualSubTreeBefore` or `AddVirtualSubTreeAfter` methods. These methods need to be on the root level `UIBuilderConfigBuilder` instance and pass a match expression used to identify the tree node to insert before/after. This expression is passed a single `TreeNode` argument to determine the position. It also requires a `boolean` return value to indicate the relevant location has been found. - -````csharp -public class TreeNode -{ - public object Id { get; } - public object ParentId { get; } - public string Alias { get; } - public string Name { get; } - public string NodeType { get; } - public string Path { get; } - public string RoutePath { get; } - public IDictionary AdditionalData { get; } - ... -} -```` - -Below you can find an example of positioning a subtree after a node with the alias "settings": - -````csharp -treeNode => treeNode.alias == "settings" -```` - -## Configuring a Virtual SubTrees - -Virtual subtrees share the same API as the `Tree` config builder API including support for folders and collections. There is an exception when adding collections to a subtree where you will have an additional foreign key expression parameter to define. The foreign key expression links the entities of the collection to the parent node of the subtree. For more information check the [Core Trees Documentation](../areas/trees.md). - -## Injecting Virtual SubTrees into 3rd party trees - -Out of the box, Umbraco UI Builder supports injecting subtrees into the core content, media, members, and member group trees. It also includes 3rd party support for [Umbraco Commerce](../../umbraco-commerce/README.md) settings and commerce trees. In order to support additional trees to inject into, you must implement an `ITreeHelper` which is used to extract the required information. The tree helper consists of a tree alias for which the tree helper is. It includes methods to correctly identify the full parent path, a unique ID for a given node ID, and to resolve the actual entity ID. The entity ID should be used for the foreign key collection values. - -````csharp -public interface ITreeHelper -{ - string TreeAlias { get; } - string GetUniqueId(string nodeId, FormCollection queryString); - object GetEntityId(string uniqueId); - string GetPath(string uniqueId); -} -```` - -Once you have defined a tree helper, you can register the DI container in your startup class. - -````csharp -builder.Services.AddSingleton(); -```` - -Once registered any virtual subtrees registered against the given helpers tree alias will then use your tree helper to locate the required information. diff --git a/10/umbraco-ui-builder/areas/context-apps.md b/10/umbraco-ui-builder/areas/context-apps.md deleted file mode 100644 index ad04cf5d62d..00000000000 --- a/10/umbraco-ui-builder/areas/context-apps.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -description: Configuring context apps in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Context Apps - -Context Apps in Umbraco UI Builder are analogous to Content Apps in Umbraco. They allow you to provide contextual apps that appear in the editor UI of content. From Umbraco UI Builder's perspective, defining context apps allows you to expose collections as content apps. This is where a collection has a relation to the content in question. An example could be something like blog post comments which are linked to individual blog posts. Exposing these as a content app allows them to be managed in context next to the blog post they are linked to. - -![Context App](../images/context_app.png) - -## Defining a context app - -You can define a context app by calling one of the `AddContextApp` methods on a [`WithTreeConfigBuilder`](trees.md#extending-an-existing-tree) instance. - -### **AddContextApp(string name, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app with the given name and default icon. - -```csharp -// Example -withTreeConfig.AddContextApp("Comments", contextAppConfig => { - ... -}); -``` - -### **AddContextApp(string name, string icon, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app to the Umbraco menu with the given name and icon. - -```csharp -// Example -withTreeConfig.AddContextApp("Comments", "icon-chat", contextAppConfig => { - ... -}); -``` - -### **AddContextAppBefore(string beforeAlias, string name, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app with the given name and default icon **before** the context app with the given alias. - -```csharp -// Example -withTreeConfig.AddContextAppBefore("umbContent", "Comments", contextAppConfig => { - ... -}); -``` - -### **AddContextAppBefore(string beforeAlias, string name, string icon, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app to the Umbraco menu with the given name and icon **before** the context app with the given alias. - -```csharp -// Example -withTreeConfig.AddContextAppBefore("umbContent", "Comments", "icon-chat", contextAppConfig => { - ... -}); -``` - -### **AddContextAppAfter(string afterAlias, string name, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app with the given name and default icon **after** the context app with the given alias. - -```csharp -// Example -withTreeConfig.AddContextAppAfter("umbContent", "Comments", contextAppConfig => { - ... -}); -``` - -### **AddContextAppAfter(string afterAlias, string name, string icon, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app to the Umbraco menu with the given name and icon **after** the context app with the given alias. - -```csharp -// Example -withTreeConfig.AddContextAppAfter("umbContent", "Comments", "icon-chat", contextAppConfig => { - ... -}); -``` - -## Changing a context app alias - -### **SetAlias(string alias) : ContextAppConfigBuilder** - -Sets the alias of the context app. - -**Optional:** When adding a new context app, an alias is automatically generated from the supplied name for you. However, you can use the `SetAlias` method to override this if you need a specific alias. - -```csharp -// Example -contextAppConfig.SetAlias("comments"); -``` - -## Changing a context app icon color - -### **SetIconColor(string color) : ContextAppConfigBuilder** - -Sets the context app icon color to the given color. Possible options are `black`, `green`, `yellow`, `orange`, `blue` or `red`. - -````csharp -// Example -contextAppConfig.SetIconColor("blue"); -```` - -## Changing when a context app should display - -Changing when a context app is displayed, is controlled by a delegate method which is passed a `ContextAppVisibilityContext` instance. This method contains a `Source` property which holds a reference to the source object that the content app is being displayed on (i.e., an `IContent` instance). It also holds a reference to a `UserGroups` collection of the currently logged-in user's user groups. You can use any value from those to return a boolean result which sets whether to display the context app or not. - -By default, Umbraco UI Builder will pre-filter context apps to only display on the tree it is defined in. This will be combined with the `SetVisibility` config to decide when to display the context app. - -### **SetVisibility(Func<ContextAppVisibilityContext, bool> visibilityExpression) : ContextAppConfigBuilder** - -Sets the context app visibility delegate. - -````csharp -// Example -contextAppConfig.SetVisibility(appCtx => appCtx.Source is IContent content && content.ContentType.Alias == "blogPost"); -```` - -## Adding a collection to a context app - -Context apps can consist of one or more collections. If a context app contains multiple collections, the collection list views will be displayed in tabs within the context app. - -### **AddCollection<TEntityType>(Lambda idFieldExpression, Lambda fkFieldExpression, string nameSingular, string namePlural, string description, Lambda collectionConfig = null) : ContextAppConfigBuilder** - -Adds a collection to the current content app with the given names, descriptions and default icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. A foreign key property accessor is also required so that the Umbraco UI Builder knows which property holds the Umbraco nodes UDI value. You can read more about this in the [Collections documentation](../collections/overview.md). - -```csharp -// Example -contextAppConfig.AddCollection(p => p.Id, p=> "Comment", "Comments", "A collection of comments", collectionConfig => { - ... -}); -``` - -### **AddCollection<TEntityType>(Lambda idFieldExpression, Lambda fkFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : ContextAppConfigBuilder** - -Adds a collection to the current context app with the given names, description and icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. A foreign key property accessor is also required so that Umbraco UI Builder knows which property holds the Umbraco nodes UDI value. You can read more about this in the [Collections documentation](../collections/overview.md). - -```csharp -// Example -contextAppConfig.AddCollection(p => p.Id, "Comment", "Comments", "A collection of comments", "icon-chat", "icon-chat", collectionConfig => { - ... -}); -``` diff --git a/10/umbraco-ui-builder/areas/dashboards.md b/10/umbraco-ui-builder/areas/dashboards.md deleted file mode 100644 index 3a84ba959ff..00000000000 --- a/10/umbraco-ui-builder/areas/dashboards.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -description: Configuring dashboards in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Dashboards - -A dashboard is a view that is displayed at the root of a section and contains welcome information. It also includes useful tools relevant to the given section. When there are multiple dashboards to display in a section these are presented in a tabbed layout to allow you to switch between the dashboards. - -![Dashboards](../images/dashboards.png) - -## Defining a dashboard - -You can define a dashboard by calling one of the `AddDashboard` methods on either a [`SectionConfigBuilder`](sections.md) or a [`WithSectionConfigBuilder`](sections.md#extending-an-existing-section) instance. - -### **AddDashboard(string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name. - -```csharp -// Example -sectionConfig.AddDashboard("Team", dashboardConfig => { - ... -}); -``` - -### **AddDashboardBefore(string beforeAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name **before** the dashboard with the given alias. - -```csharp -// Example -sectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => { - ... -}); -``` - -### **AddDashboardAfter(string afterAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name **after** the dashboard with the given alias. - -```csharp -// Example -sectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => { - ... -}); -``` - -## Changing a dashboard alias - -### **SetAlias(string alias) : DashboardConfigBuilder** - -Sets the alias of the dashboard. - -**Optional:** When adding a new dashboard, an alias is automatically generated from the supplied name for you. However, if you need a specific alias you can use the `SetAlias` method to override this. - -```csharp -// Example -dashboardConfig.SetAlias("team"); -``` - -## Changing when a dashboard should display - -Changing when a dashboard is displayed is controlled via an inner config. Options on the inner config are `ShowForUserGroup` and `HideForUserGroup` to control the visibility of the dashboard for given user groups. You can call these config methods multiple times to add multiple role configurations. - -By default, will pre-filter dashboards to display only on the section it is defined in. This will be combined with the `SetVisibility` config to decide when to display the dashboard. - -### **SetVisibility(Lambda visibilityConfig) : DashboardConfigBuilder** - -Sets the dashboard visibility config. - -````csharp -// Example -dashboardConfig.SetVisibility(visibilityConfig => visibilityConfig - .ShowForUserGroup("admin") - .HideForUserGroup("translator") -); -```` - -## Setting the collection of a dashboard - -Dashboards are only able to display a single collection. If you need to display multiple collections, then you need to configure multiple dashboards. - -### **SetCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, Lambda collectionConfig = null) : ContextAppConfigBuilder** - -Sets the collection of the current dashboard with the given names, descriptions, and default icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the [Collections documentation](../collections/overview.md). - -```csharp -// Example -dashboardConfig.SetCollection(p => p.Id, p=> "Team Member", "Team Members", "A collection of team members", collectionConfig => { - ... -}); -``` - -### **SetCollection<TEntityType>(Lambda idFieldExpression, Lambda fkFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : ContextAppConfigBuilder** - -Sets the collection of the current dashboard with the given names, description and icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the [Collections documentation](../collections/overview.md). - -```csharp -// Example -dashboardConfig.SetCollection(p => p.Id, "Team Member", "Team Members", "A collection of team members", "icon-umm-user", "icon-umb-user", collectionConfig => { - ... -}); -``` diff --git a/10/umbraco-ui-builder/areas/folders.md b/10/umbraco-ui-builder/areas/folders.md deleted file mode 100644 index 4f9017346fd..00000000000 --- a/10/umbraco-ui-builder/areas/folders.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -description: Configuring folders to organise trees in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Folders - -A folder can appear in either a tree or as a sub folder to other folders. Folders can contain either other (sub)folders or [collections](../collections/overview.md). - -![Tree with Settings folder](../images/tree.png) - -## Defining a folder - -You can define a folder by calling one of the `AddFolder` methods on a given [`Tree`](trees.md) or parent `Folder` config builder instance. - -### **AddFolder(string name, Lambda folderConfig = null) : FolderConfigBuilder** - -Adds a folder to the current tree with the given name and a default folder icon. - -````csharp -// Example -treeConfig.AddFolder("Settings", folderConfig => { - ... -}); -```` - -### **AddFolder(string name, string icon, Lambda folderConfig = null) : FolderConfigBuilder** - -Adds a folder to the current tree with the given name + icon. - -````csharp -// Example -treeConfig.AddFolder("Settings", "icon-settings", folderConfig => { - ... -}); -```` - -## Changing a folder alias - -### **SetAlias(string alias) : FolderConfigBuilder** - -Sets the alias of the folder. - -**Optional:** When creating a new folder, an alias is automatically generated from the supplied name for you. However, if you need a specific alias you can use the `SetAlias` method to override this. - -````csharp -// Example -folderConfig.SetAlias("settings"); -```` - -## Changing a folder icon color - -### **SetIconColor(string color) : FolderConfigBuilder** - -Sets the folder icon color to the given color. The options that are possible are `black`, `green`, `yellow`, `orange`, `blue` or `red`. - -````csharp -// Example -folderConfig.SetIconColor("blue"); -```` - -## Adding a sub folder to a folder - -### **AddFolder (string name, Lambda folderConfig = null) : FolderConfigBuilder** - -Adds a sub folder to the current folder with the given name and a default folder icon. - -````csharp -// Example -folderConfig.AddFolder("Categories", subFolderConfig => { - ... -}); -```` - -### **AddFolder (string name, string icon, Lambda folderConfig = null) : FolderConfigBuilder** - -Adds a sub folder to the current folder with the given name + icon. - -````csharp -// Example -folderConfig.AddFolder("Categories", "icon-tags", subFolderConfig => { - ... -}); -```` - -## Adding a collection to a folder - -### **AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds a collection to the current folder with the given names, descriptions, and default icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the [Collections documentation](../collections/overview.md). - -````csharp -// Example -folderConfig.AddCollection(p => p.Id, "Person", "People", "A collection of people", collectionConfig => { - ... -}); -```` - -### **AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds a collection to the current folder with the given names, description and icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the [Collections documentation](../collections/overview.md). - -````csharp -// Example -folderConfig.AddCollection(p => p.Id, "Person", "People", "A collection of people", "icon-umb-users", "icon-umb-users", collectionConfig => { - ... -}); -```` diff --git a/10/umbraco-ui-builder/areas/overview.md b/10/umbraco-ui-builder/areas/overview.md deleted file mode 100644 index 49e31b9031c..00000000000 --- a/10/umbraco-ui-builder/areas/overview.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -description: Choosing an area to connect Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Areas - -There are different areas of the Umbraco UI that Umbraco UI Builder can be injected into. Before you get to managing your actual content you need to choose which area makes the most sense to present that data in. Then you can review how to go about configuring that particular type of area. - -Choose an area type from the list below to find out more. - -{% content-ref url="sections.md" %} -[sections.md](sections.md) -{% endcontent-ref %} -{% content-ref url="dashboards.md" %} -[dashboards.md](dashboards.md) -{% endcontent-ref %} -{% content-ref url="context-apps.md" %} -[context-apps.md](context-apps.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/areas/sections.md b/10/umbraco-ui-builder/areas/sections.md deleted file mode 100644 index 3ac357ad3d9..00000000000 --- a/10/umbraco-ui-builder/areas/sections.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -description: Configuring sections in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Sections - -A section is a distinct area of the Umbraco backoffice, such as content, media, etc. The section is accessed via a link in the main menu at the top of the Umbraco interface. Umbraco UI Builder allows you to define multiple sections in order to organise the management of your models into logical sections. - -![Sections](../images/sections.png) - -## Defining a section - -You can define a section by calling one of the `AddSection` methods on the root level `UIBuilderConfigBuilder` instance. - -### **AddSection(string name, Lambda sectionConfig = null) : SectionConfigBuilder** - -Adds a section to the Umbraco menu with the given name. - -```csharp -// Example -config.AddSection("Repositories", sectionConfig => { - ... -}); -``` - -### **AddSectionBefore(string beforeAlias, string name, Lambda sectionConfig = null) : SectionConfigBuilder** - -Adds a section to the Umbraco menu with the given name **before** the section with the given alias. - -```csharp -// Example -config.AddSectionBefore("settings", "Repositories", sectionConfig => { - ... -}); -``` - -### **AddSectionAfter(string afterAlias, string name, Lambda sectionConfig = null) : SectionConfigBuilder** - -Adds a section to the Umbraco menu with the given name **after** the section with the given alias. - -```csharp -// Example -config.AddSectionAfter("media", "Repositories", sectionConfig => { - ... -}); -``` - -## Changing a section alias - -### **SetAlias(string alias) : SectionConfigBuilder** - -Sets the alias of the section. - -**Optional:** When adding a new section, an alias is automatically generated from the supplied name for you. However, if you need a specific alias you can use the `SetAlias` method to override this. - -```csharp -// Example -sectionConfig.SetAlias("repositories"); -``` - -## Configuring the section tree - -### **Tree(Lambda treeConfig = null) : TreeConfigBuilder** - -Accesses the tree config of the current section. For more information check the [Trees documentation](trees.md). - -````csharp -// Example -sectionConfig.Tree(treeConfig => { - ... -}); -```` - -## Adding a dashboard to the section - -### **AddDashboard(string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name. For more information check the [Dashboards documentation](dashboards.md). - -```csharp -// Example -sectionConfig.AddDashboard("Team", dashboardConfig => { - ... -}); -``` - -#### **AddDashboardBefore(string beforeAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name **before** the dashboard with the given alias. For more information check the [Dashboards documentation](dashboards.md). - -```csharp -// Example -sectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => { - ... -}); -``` - -#### **AddDashboardAfter(string afterAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name **after** the dashboard with the given alias. For more information check the [Dashboards documentation](dashboards.md). - -```csharp -// Example -sectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => { - ... -}); -``` - -## Extending an existing section - -You can extend existing sections by adding Umbraco UI Builder trees and dashboards, context apps, and virtual subtrees. This can be done by calling the `WithSection` method on the root level `UIBuilderConfigBuilder` instance. - -### **WithSection(string alias, Lambda sectionConfig = null) : WithSectionConfigBuilder** - -Starts a sub-configuration for the existing Umbraco section with the given alias. - -```csharp -// Example -config.WithSection("member", withSectionConfig => { - ... -}); -``` - -## Adding a tree to an existing section - -### **AddTree(string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section. For more information check the [Trees documentation](trees.md). - -````csharp -// Example -withSectionConfig.AddTree("My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -#### **AddTree(string groupName, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section in a group with the given name. For more information check the [Trees documentation](trees.md). - -````csharp -// Example -withSectionConfig.AddTree("My Group", "My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -#### **AddTreeBefore(string treeAlias, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section **before** the tree with the given alias. For more information check the [Trees documentation](trees.md). - -````csharp -// Example -withSectionConfig.AddTreeBefore("member", "My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -#### **AddTreeAfter(string treeAlias, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section **after** the tree with the given alias. For more information check the [Trees documentation](trees.md). - -````csharp -// Example -withSectionConfig.AddTreeAfter("member", "My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -## Adding a dashboard to an existing section - -### **AddDashboard (string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name. For more information check the [Dashboards documentation](dashboards.md). - -```csharp -// Example -withSectionConfig.AddDashboard("Team", dashboardConfig => { - ... -}); -``` - -### **AddDashboardBefore (string beforeAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name **before** the dashboard with the given alias. For more information check the [Dashboards documentation](dashboards.md). - -```csharp -// Example -withSectionConfig.AddDashboardBefore("contentIntro", "Team", dashboardConfig => { - ... -}); -``` - -### **AddDashboardAfter (string afterAlias, string name, Lambda dashboardConfig = null) : DashboardConfigBuilder** - -Adds a dashboard with the given name **after** the dashboard with the given alias. For more information check the [Dashboards documentation](dashboards.md). - -```csharp -// Example -withSectionConfig.AddDashboardAfter("contentIntro", "Team", dashboardConfig => { - ... -}); -``` diff --git a/10/umbraco-ui-builder/areas/summary-dashboards.md b/10/umbraco-ui-builder/areas/summary-dashboards.md deleted file mode 100644 index 85114eba8d3..00000000000 --- a/10/umbraco-ui-builder/areas/summary-dashboards.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -description: Configuring a summary dashboard in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Summary Dashboards - -A summary dashboard is automatically displayed at the root of a defined Umbraco UI Builder section. It displays summaries of collections found within it that are told to display on the dashboard. It also provides quick links to jump to that collections list view. It can also add quickly a new entry to that collection (if the collection isn't read-only). - -![Summary Dashboard](../images/section_dashboard.png) - -## Showing a collection on a summary dashboard - -Showing a collection in the summary dashboard is controlled via the collection configuration. - -### **ShowOnSummaryDashboard() : CollectionConfigBuilder<TEntityType>** - -Sets the collection to display on the summary dashboard. - -````csharp -// Example -collectionConfig.ShowOnSummaryDashboard(); -```` - -{% hint style="warning" %} -Only section root level collections can be shown on the summary dashboard. -{% endhint %} diff --git a/10/umbraco-ui-builder/areas/trees.md b/10/umbraco-ui-builder/areas/trees.md deleted file mode 100644 index 551f95bbc4d..00000000000 --- a/10/umbraco-ui-builder/areas/trees.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -description: Configuring trees in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Trees - -A tree is a hierarchical structure that helps organize a section into logical sub-sections. A tree is accessed in the main side panel of the Umbraco interface. In Umbraco UI Builder, a section may only have a single tree definition. However, you can use folder nodes to help organize the tree structure as you need it. - -![Tree](../images/tree.png) - -## Configuring a Umbraco UI Builder section tree - -The tree configuration for Umbraco UI Builder sections is a sub-configuration of a [`Section`](sections.md) config builder instance and is accessed via its `Tree` method. - -### **Tree(Lambda treeConfig = null) : TreeConfigBuilder** - -Accesses the tree config of the given section. - -````csharp -// Example -sectionConfig.Tree(treeConfig => { - ... -}); -```` - -## Adding a tree to an existing section - -The tree configuration for existing sections is a sub-configuration of a [`WithSection`](sections.md#extending-an-existing-section) config builder instance and is accessed via one of its `AddTree` methods. - -### **AddTree(string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section. - -````csharp -// Example -withSectionConfig.AddTree("My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -### **AddTree(string groupName, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section in a group with the given name. - -````csharp -// Example -withSectionConfig.AddTree("My Group", "My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -### **AddTreeBefore(string treeAlias, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section **before** the tree with the given alias. - -````csharp -// Example -withSectionConfig.AddTreeBefore("member", "My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -### **AddTreeAfter(string treeAlias, string name, string icon, Lambda treeConfig = null) : TreeConfigBuilder** - -Adds a tree to the current section **after** the tree with the given alias. - -````csharp -// Example -withSectionConfig.AddTreeAfter("member", "My Tree", "icon-folder", treeConfig => { - ... -}); -```` - -## Changing the tree icon color - -### **SetIconColor(string color) : TreeConfigBuilder** - -Sets the trees icon color to the given color. The options that are possible are `black`, `green`, `yellow`, `orange`, `blue` or `red`. - -{% hint style="warning" %} -Only trees added to existing sections have an icon. Trees added to Umbraco UI Builder sections don't show a tree icon instead they go straight into displaying the tree contents. -{% endhint %} - -````csharp -// Example -collectionConfig.SetIconColor("blue"); -```` - -## Adding a group to a tree - -### **AddGroup(string name, Lambda groupConfig = null) : GroupConfigBuilder** - -Adds a group to the current tree with the given name. - -{% hint style="warning" %} -Only Umbraco UI Builder section trees can configure groups, where trees added to existing sections cannot. -{% endhint %} - -```csharp -// Example -treeConfig.AddGroup("Settings", groupConfig => { - ... -}); -``` - -## Adding a folder to a tree/group - -### **AddFolder(string name, Lambda folderConfig = null) : FolderConfigBuilder** - -Adds a folder to the current tree/group with the given name and a default folder icon. For more information check the [Folders documentation](folders.md). - -```csharp -// Example -treeConfig.AddFolder("Settings", folderConfig => { - ... -}); -``` - -### **AddFolder(string name, string icon, Lambda folderConfig = null) : FolderConfigBuilder** - -Adds a folder to the current tree/group with the given name + icon. For more information check the [Folders documentation](folders.md). - -```csharp -// Example -treeConfig.AddFolder("Settings", "icon-settings", folderConfig => { - ... -}); -``` - -## Adding a collection to a tree/group - -### **AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds a collection to the current tree/group with the given names, descriptions, and default icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the [Collections documentation](../collections/overview.md). - -```csharp -// Example -treeConfig.AddCollection(p => p.Id, "Person", "People", "A collection of people", collectionConfig => { - ... -}); -``` - -#### **AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds a collection to the current tree/group with the given names, description and icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. For more information check the [Collections documentation](../collections/overview.md). - -```csharp -// Example -treeConfig.AddCollection(p => p.Id, "Person", "People", "A collection of people", "icon-umb-users", "icon-umb-users", collectionConfig => { - ... -}); -``` - -## Extending an existing tree - -You can extend existing trees adding Umbraco UI Builder context apps and virtual sub trees by calling the `WithTree` method of a [`WithSectionConfigBuilder`](sections.md#extending-an-existing-section) instance. - -### **WithTree(string alias, Lambda treeConfig = null) : WithTreeConfigBuilder** - -Starts a sub-configuration for the existing Umbraco tree with the given alias. - -```csharp -// Example -sectionConfig.WithTree("content", withTreeConfig => { - ... -}); -``` - -## Adding a context app to an existing tree - -### **AddContextApp(string name, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app with the given name and default icon. For more information check the [Context App documentation](context-apps.md). - -```csharp -// Example -withTreeConfig.AddContextApp("Comments", contextAppConfig => { - ... -}); -``` - -### **AddContextApp(string name, string icon, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app to the Umbraco menu with the given name and icon. For more information check the [Context App documentation](context-apps.md). - -```csharp -// Example -withTreeConfig.AddContextApp("Comments", "icon-chat", contextAppConfig => { - ... -}); -``` - -### **AddContextAppBefore(string beforeAlias, string name, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app with the given name and default icon **before** the context app with the given alias. For more information check the [Context App documentation](context-apps.md). - -```csharp -// Example -withTreeConfig.AddContextAppBefore("umbContent", "Comments", contextAppConfig => { - ... -}); -``` - -### **AddContextAppBefore(string beforeAlias, string name, string icon, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app to the Umbraco menu with the given name and icon **before** the context app with the given alias. For more information check the [Context App documentation](context-apps.md). - -```csharp -// Example -withTreeConfig.AddContextAppBefore("umbContent", "Comments", "icon-chat", contextAppConfig => { - ... -}); -``` - -### **AddContextAppAfter(string afterAlias, string name, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app with the given name and default icon **after** the context app with the given alias. For more information check the [Context App documentation](context-apps.md). - -```csharp -// Example -withTreeConfig.AddContextAppAfter("umbContent", "Comments", contextAppConfig => { - ... -}); -``` - -### **AddContextAppAfter(string afterAlias, string name, string icon, Lambda contextAppConfig = null) : ContextAppConfigBuilder** - -Adds a context app to the Umbraco menu with the given name and icon **after** the context app with the given alias. For more information check the [Context App documentation](context-apps.md). - -```csharp -// Example -withTreeConfig.AddContextAppAfter("umbContent", "Comments", "icon-chat", contextAppConfig => { - ... -}); -``` diff --git a/10/umbraco-ui-builder/cards/count-cards.md b/10/umbraco-ui-builder/cards/count-cards.md deleted file mode 100644 index 57830b0be1c..00000000000 --- a/10/umbraco-ui-builder/cards/count-cards.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -description: Configuring count cards in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Count Cards - -Count cards allow you to define cards directly against the [collection](../collections/overview.md) configuration, providing a basic **where clause** to use in a count SQL statement. These work perfectly for basic data visualizations based on counts of entities in a collection. - -If you need to do more than a basic count, you'll want to take a look at the [custom cards](custom-cards.md) documentation. - -## Adding a count card to a collection - -Cards allow you to display basic summaries of key information that may be useful to the editor. - -### **AddCard(string name, Lambda whereClauseExpression, Lambda cardConfig = null) : CardConfigBuilder** - -Adds a card with the given name and **where clause** filter expression. Expression must be a `boolean` expression. - -````csharp -// Example -collectionConfig.AddCard("Older than 30", p => p.Age > 30, cardConfig => { - ... -}); -```` - -### **AddCard(string name, string icon, Lambda whereClauseExpression, Lambda cardConfig = null) : CardConfigBuilder** - -Adds a card with the given name + icon and **where clause** filter expression. Expression must be a `boolean` expression. - -````csharp -// Example -collectionConfig.AddCard("Older than 30", "icon-umb-users", p => p.Age > 30, cardConfig => { - ... -}); -```` - -### Change the color of a count card - -#### **SetColor(string color) : CardConfigBuilder** - -Sets the color of the card. - -````csharp -// Example -cardConfig.SetColor("blue"); -```` - -### Add a suffix to a count value - -#### **SetSuffix(string suffix) : CardConfigBuilder** - -Sets the suffix of the card value. - -````csharp -// Example -cardConfig.SetSuffix("years"); -```` - -### Formatting the value of a count - -#### **SetFormat(Lambda formatExpression) : CardConfigBuilder** - -Sets the format expression for the card. - -````csharp -// Example -cardConfig.SetFormat((v) => $"{v}%"); -```` diff --git a/10/umbraco-ui-builder/cards/custom-cards.md b/10/umbraco-ui-builder/cards/custom-cards.md deleted file mode 100644 index 0cbec414a86..00000000000 --- a/10/umbraco-ui-builder/cards/custom-cards.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -description: Configuring custom cards in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Custom Cards - -Custom cards allow you to perform more complex metric calculations and are defined via a class implementing the `Card` base class. - -When Umbraco UI Builder resolves a card it will attempt to do so from the global DI container. This means you can inject any dependencies that you require for your card to calculate its value. If there is no type defined in the DI container, Umbraco UI Builder will fall-back to manually instantiating a new instance of value mapper. - -## Defining a custom card - -To define a card you create a class that inherits from the base class `Card` and configure it within the constructor like so. - -````csharp -// Example -public class AvgPersonAgeCard : Card -{ - public override string Alias => "avgPersonAge"; - public override string Name => "Average Age"; - public override string Icon => "icon-calendar"; - public override string Color => "green"; - public override string Suffix => "yrs"; - - public override object GetValue(object parentId = null) - { - // Perform value calculation logic - } -} -```` - -The required configuration options are: - -* **Name:** The name of the card. -* **Alias:** A unique alias for the card. -* **GetValue(object parentId = null):** A method to get the cards value. - -Additional optional configuration options are: - -* **Icon:** An icon to display in the card. -* **Color:** The color of the card. -* **Suffix:** A suffix to display after the card value. - -## Adding a custom card to a collection - -### **AddCard() : CollectionConfigBuilder<TEntityType>** - -Adds a card of the given type to the collection. - -````csharp -// Example -collectionConfig.AddCard(); -```` - -### **AddCard(Type cardType) : CollectionConfigBuilder<TEntityType>** - -Adds a card of the given type to the collection. - -````csharp -// Example -collectionConfig.AddCard(typeof(AvgPersonAgeCard)); -```` diff --git a/10/umbraco-ui-builder/cards/overview.md b/10/umbraco-ui-builder/cards/overview.md deleted file mode 100644 index 35b687e3e60..00000000000 --- a/10/umbraco-ui-builder/cards/overview.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -description: Configuring cards in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Cards - -Cards provide an API to display basic summary information in a card-based format and are useful for displaying key metrics about a collection. - -![Cards](../images/cards.png) - -Cards can be defined in one of two ways: - -{% content-ref url="count-cards.md" %} -[Count Cards](count-cards.md) -{% endcontent-ref %} - -{% content-ref url="custom-cards.md" %} -[Custom Cards](custom-cards.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/changelog-archive/changelog.md b/10/umbraco-ui-builder/changelog-archive/changelog.md deleted file mode 100644 index 82b8c320984..00000000000 --- a/10/umbraco-ui-builder/changelog-archive/changelog.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -description: Changelog for Konstrukt, the backoffice UI builder for Umbraco. ---- - -# Changelog - -## v1.6.4 - -**Date:** 2023-02-22 -**Description:** Patch release with bug fixes - -- Fixed issue where upload file property editor throws "the specified file type has been disallowed by the administrator" error ([#49](https://github.com/outfielddigital/konstrukt/issues/49)). -- Added ngrok URLs to allow domains that don't need a license. - -## v1.6.3 - -**Date:** 2023-01-16 -**Description:** Patch release with bug fixes - -- Moved encrypted properties implementation to the base repository class so encryption is honored when performing save/load operation directly against the repository API ([#44](https://github.com/outfielddigital/konstrukt/issues/44)). -- Made `SecurityHelper` swappable so you can use something other than the default `DataProtectionProvider` implementation that comes out of the box (OOTB). -- Fixed issue with advanced filters that use the lambda `ParameterReplacer` due to the parameter being replaced in the function, but not in the Lambda parameters list ([#45](https://github.com/outfielddigital/konstrukt/issues/45)). -- Fixed date filters not working on mobile resolution devices ([#46](https://github.com/outfielddigital/konstrukt/issues/46)). - -## v1.6.2 - -**Date:** 2022-12-01 -**Description:** Patch release with bug fixes - -- Added marketplace updates. -- Update the Konstrukt type finder to use a non-obsolete constructor. -- Updated to use `IComposer` instead of `IUserComposer` as the latter has been removed in v11. -- Fixed parent ID not being passed to create dialog for associated entities. -- Removed settings section restriction on the licensing info endpoint as it would cause errors when the licensing banner is shown in other sections. - -## v1.6.1 - -**Date:** 2022-10-11 -**Description:** Patch release with bug fixes - -- Fixed issue when running on Azure where the DB provider name reverts to `System.Data.SqlClient` when it should be `Microsoft.Data.SqlClient` - -## v1.6.0 - -**Date:** 2022-09-30 -**Description:** Minor release with additional features - -- Added a Save action type to display actions as a sub-button in an entities Save button (similar to the "Save and Publish" button in the content section). - -## v1.5.2 - -**Date:** 2022-09-09 -**Description:** Patch release with bug fixes - -- Fixed bug in entity picker not correctly showing the `Add` button when it should ([#39](https://github.com/outfielddigital/konstrukt/issues/39)). -- Added some basic validation to config at startup to ensure a valid config model. - -## v1.5.1 - -**Date:** 2022-08-22 -**Description:** Patch release with bug fixes - -- Fixed searchable properties not being searched in a case-insensitive way for repositories that don't use Umbraco's NPoco extension methods ([#36](https://github.com/outfielddigital/konstrukt/issues/36)). -- Fixed regression in Konstrukt repository not correctly combining filters. -- Fixed exception due to `ServiceProvider` not getting passed to Data transfer object (DTO) mapper. - -## v1.5.0 - -**Date:** 2022-08-18 -**Description:** Minor release with additional features and bug fixes - -- Added ability to control collection visibility in the section tree at runtime. -- Added ability to control collection create, update, and delete permissions at runtime. -- Added ability to control list view field visibility at runtime. -- Added ability to control editor tab visibility at runtime. -- Added ability to control editor fieldset visibility at runtime. -- Added ability to control editor field visibility at runtime. -- Added ability to control whether an editor field is read-only or not at runtime. -- Added the ability to add custom dashboards to Konstrukt sections. -- Added child collections support to dashboard collections. -- Updated Konstrukt API to null check sections/collections first and throw exceptions if not found. -- Updated based repositories to automatically implement filtering for configurable options. -- Updated the summary dashboard to not display if there are no collections configured to show on it. -- Fixed bug where entity service would silently fail if it couldn't retrieve an entity. Now throws an exception. -- Fixed bug where content app factory would throw an exception when run in sections where the section entity was not `IUmbracoEntity`. - -## v1.4.0 - -**Date:** 2022-07-12 -**Description:** Minor release with additional features and bug fixes - -- Added [`WithSection`](../areas/sections.md#extending-an-existing-section) / [`WithTree`](../areas/trees.md#extending-an-existing-tree) API to create more logical API groupings and to set context for some APIs. -- Added [`AddTree`](../areas/trees.md#adding-a-tree-to-an-existing-section) support to allow adding a tree to an existing section (currently only able to add 1 Konstrukt tree per section). -- Added [Tree Group](../areas/trees.md#adding-a-group-to-a-tree) support to allow grouping root-level tree folders/collections. -- Added [Tab Sidebar](../collections/editors.md#configuring-a-sidebar-to-a-tab) support to allow showing metadata on the right-hand side of the editor. -- Added file upload support to the actions dialog -- Added a basic [Comma-separated values (CSV) Import](../actions/inbuilt-actions.md#konstruktimportentityaction) action -- Added [`HideLabel`](../collections/editors.md#hiding-the-label-of-a-field) support to editor fields to explicitly hide the label. -- Added explicit Insert / Update methods to IKonstruktRepository. Internally we use these now instead of the Save method as the Save method isn't reliably able to determine if an entity is new. -- Added better support for transient / scoped repository dependencies (example: better support for EF Core DB contexts which are by default registered as scoped) -- Obsoleted root-level APIs for `AddSection`, `AddDashboard` and `AddVirtualSubTree` which have now moved to sub-configurations of the [`WithSection`](../areas/sections.md#extending-an-existing-section) or [`WithTree`](../areas/trees.md#extending-an-existing-tree) APIs. -- Fixed bug with DataViews resolving the wrong filter when using groups and the data view has the same name as a view in a different group. We now prefix the data view alias with the group name to ensure uniqueness across groups. -- Fixed bug in child collections creating dialog thinking it was always editing an existing entity and so wrongfully trying to load an entity from the DB due to the fact the entity ID passed through to the dialog "0" when it should be "-1". - -## v1.3.0 - -**Date:** 2022-07-06 -**Description:** Minor release with additional features and bug fixes - -- Added [Virtual Sub Trees](../advanced/virtual-sub-trees.md) support -- Fixed save/delete notification events being passed the wrong model -- Fixed bug where connection strings with no provider cause an error - -## v1.2.0 - -**Date:** 2022-06-20 -**Description:** Minor release with some breaking changes / additional features - -- Added `DeletedProperty` support where the column type is an `int`, and the value is a unix timestamp -- Fixed bug with encrypted properties not handling `null` values -- **[Breaking]** - Updated minimum Umbraco dependency to v10 -- **[Breaking]** - Updated UI assets to be a (RCL) Razor Compiled Library. **Be sure to clean your solution to remove old files**. - -## v1.1.1 - -**Date:** 2022-06-08 -**Description:** Minor patch release with non-breaking changes - -- Added client-side required / regex validation support -- Added support for nullable types when mapping property filters -- Added support for passing notification messages back from action results -- Fixed SQL escaping issue when using table names with schema prefix -- Fixed a bug in range property filters when a value is `null` -- Fixed a bug where save operations would show a success notification even if the save operation failed -- Fixed a bug in Data Attribute validation where `IServiceProvider` wasn't being passed through -- Fixed `null` error when searching returns no items -- Fixed deleted property filter condition not working -- Fixed bug where encrypted properties would throw an exception if the value was `null` - -## v1.1.0 - -**Date:** 2022-05-03 -**Description:** Minor release with some breaking changes / additional features - -- Added field views support for custom field markup in list views -- Added new consistent actions API -- Added row actions support -- Added filterable properties support -- Fixed entity picker value converter not working -- Fixed JS error when editing content due to bad null checking in the Konstrukt `redirectId` interceptor -- Deprecated List View Layout support -- **[Breaking]** - Obsoleted bulk actions and menu items in favour of new actions API -- **[Breaking]** - Moved actions, data views and cards configuration out of list views onto collections API - -## v1.0.2 - -**Date:** 2022-04-11 -**Description:** Minor patch release with non-breaking changes - -- Fixed OrderBy not handling name field correctly -- Updated license warning to only display if the number of "editable" collections is exceeded -- Fixed custom connection strings not working by implementing a DB factory pattern -- Introduced `IKonstruktNodeUdiResolver` to allow content apps to resolve a different node UDI than the current page -- Fixed error being thrown by menu actions because the current section wasn't being passed through to the menu - -## v1.0.1 - -**Date:** 2022-01-27 -**Description:** Minor patch release with non-breaking changes - -- Fixed bug where section/tree registration can sometimes occur twice resulting in an error. -- Removed licensing header when using a single collection. -- Fixed bug with `ORDER BY 1` causing SQL exceptions - -## v1.0.0 - -**Date:** 2022-01-20 -**Description:** Major new release - -- Initial release diff --git a/10/umbraco-ui-builder/collections/child-collection-groups.md b/10/umbraco-ui-builder/collections/child-collection-groups.md deleted file mode 100644 index 650eecf0711..00000000000 --- a/10/umbraco-ui-builder/collections/child-collection-groups.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -description: Configuring child collection groups in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Child Collection Groups - -A child collection group is a container for other child collections. Its purpose is mainly to provide a logical grouping of multiple child collections to help with organization and an improved user experience. - -![Child Collection Groups](../images/child_collection_groups.png) - -## Defining a child collection group - -You can define a child collection group by calling one of the `AddChildCollectionGroup` methods on a given collection config builder instance. - -### **AddChildCollectionGroup(string name, Lambda childCollectionGroupConfig = null) : ChildCollectionGroupConfigBuilder** - -Adds a child collection group to the current collection with the given name and default icon. - -```csharp -// Example -collectionConfig.AddChildCollectionGroup("Family", childCollectionGroupConfig => { - ... -}); -``` - -### **AddChildCollectionGroup(string name, string icon, Lambda childCollectionGroupConfig = null) : ChildCollectionGroupConfigBuilder** - -Adds a child collection group to the current collection with the given name and icon. - -```csharp -// Example -collectionConfig.AddChildCollectionGroup("Family", "icon-users", childCollectionGroupConfig => { - ... -}); -``` diff --git a/10/umbraco-ui-builder/collections/child-collections.md b/10/umbraco-ui-builder/collections/child-collections.md deleted file mode 100644 index 3a6c8297f50..00000000000 --- a/10/umbraco-ui-builder/collections/child-collections.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -description: Configuring child collections in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Child Collections - -A child collection is a container for a given data model that is tied to a parent collection data model. It shares all of the [Collections](the-basics.md) config builder API except child collections cannot contain further child collections. - -![Child Collections](../images/child_collections.png) - -{% hint style="info" %} -**Child Collections UI:** By default, child collections will be presented in the UI as context apps in the parent models editor view. If you have multiple child collections that make the context apps area overpopulated, you can use the [Child Collection Groups API](child-collection-groups.md). By using this you can group child collections under a single context app with the inner child collections then being presented in tabs. -{% endhint %} - -## Defining a child collection - -You define a child collection by calling one of the `AddChildCollection` methods on a given collection config builder instance. - -### **AddChildCollection<TChildEntityType>(Lambda idFieldExpression, Lambda fkFieldExpression, string nameSingular, string namePlural, string description, Lambda childCollectionConfig = null) : ChildCollectionConfigBuilder<TEntityType>** - -Adds a child collection to the current collection with the given names and description and default icons. A property accessor expression is required for both the entity ID field and FK (Foreign Key) field of the entity. - -```csharp -// Example -collectionConfig.AddChildCollection(c => c.Id, c => c.ParentId, "Child", "Children", "A collection of children", childCollectionConfig => { - ... -}); -``` - -### **AddChildCollection<TChildEntityType>(Lambda idFieldExpression, Lambda fkFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda childCollectionConfig = null) : ChildCollectionConfigBuilder<TEntityType>** - -Adds a child collection to the current collection with the given names, description and icons. A property accessor expression is required for both the entity ID field and FK (Foreign Key) field of the entity. - -```csharp -// Example -collectionConfig.AddChildCollection(c => c.Id, c => c.ParentId, "Child", "Children", "A collection of children", "icon-umb-users", "icon-umb-users", childCollectionConfig => { - ... -}); -``` - -## Configuring a child collection - -Child collections share the same API as the `Collection` config builder API, except child collections cannot contain further child collections. For more information check the [core collections documentation](the-basics.md). diff --git a/10/umbraco-ui-builder/collections/editors.md b/10/umbraco-ui-builder/collections/editors.md deleted file mode 100644 index 52203dab660..00000000000 --- a/10/umbraco-ui-builder/collections/editors.md +++ /dev/null @@ -1,268 +0,0 @@ ---- -description: Configuring the editor of a collection in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Editors - -An editor is the user interface used to edit an entity and is made up of tabs and property editors. - -![A collection editor](../images/people_editor.png) - -## Configuring an editor - -The editor configuration is a sub-configuration of a [`Collection`](the-basics.md) config builder instance and is accessed via its `Editor` method. - -### **Editor(Lambda editorConfig = null) : EditorConfig<TEntityType>** - -Accesses the editor config of the given collection. - -````csharp -// Example -collectionConfig.Editor(editorConfig => { - ... -}); -```` - -## Adding a tab to an editor - -### **AddTab(string name, Lambda tabConfig = null) : EditorTabConfigBuilder<TEntityType>** - -Adds a tab to the editor. - -````csharp -// Example -editorConfig.AddTab("General", tabConfig => { - ... -}); -```` - -## Configuring a sidebar to a tab - -A slidebar is a smaller area that is displayed to the right of the main editor. The sidebar can also contain fieldsets and fields in the same way tabs can. However, it is a much more limited display area so you'll need to choose your field types carefully. The sidebar is a great location to display entity metadata. - -### **Sidebar(Lambda sidebarConfig = null) : EditorTabSidebarConfigBuilder<TEntityType>** - -Configures the sidebar for the tab. - -````csharp -// Example -tabConfig.Sidebar(sidebarConfig => { - ... -}); -```` - -## Setting the visibility of a tab - -### **SetVisibility(Predicate<EditorTabVisibilityContext> visibilityExpression) : EditorTabConfigBuilder<TEntityType>** - -Sets the runtime visibility of the tab. - -````csharp -// Example -tabConfig.SetVisibility(ctx => ctx.EditorMode == EditorMode.Create); -```` - -## Adding a fieldset to a tab - -### **AddFieldset(string name, Lambda fieldsetConfig = null) : EditorFieldsetConfigBuilder<TEntityType>** - -Adds the given fieldset to the tab. - -````csharp -// Example -tabConfig.AddFieldset("Contact", fieldsetConfig => { - ... -}); -```` - -## Setting the visibility of a fieldset - -### **SetVisibility(Predicate<EditorFieldsetVisibilityContext> visibilityExpression) : EditorFieldsetConfigBuilder<TEntityType>** - -Sets the runtime visibility of the fieldset. - -````csharp -// Example -fieldsetConfig.SetVisibility(ctx => ctx.EditorMode == EditorMode.Create); -```` - -## Adding a field to a fieldset - -### **AddField(Lambda propertyExpression, Lambda propertyConfig = null) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Adds the given property to the editor. - -````csharp -// Example -fieldsetConfig.AddField(p => p.FirstName, fieldConfig => { - ... -}); -```` - -## Changing the label of a field - -By default, Umbraco UI Builder will build the label from the property name, including splitting camel case names into sentence cases. However, you can set an explicit label if preferred. - -### **SetLabel(string label) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Sets the label for the editor field. - -````csharp -// Example -fieldConfig.SetLabel("First Name"); -```` - -## Hiding the label of a field - -Sometimes you may have a field editor that would work better in full width. You can achieve this by explicitly hiding the field label. - -### **HideLabel() : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Hides the label for the editor field. - -````csharp -// Example -fieldConfig.HideLabel(); -```` - -## Adding a description to a field - -### **SetDescription(string description) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Sets the description for the editor field. - -````csharp -// Example -fieldConfig.SetDescription("Enter your age in years"); -```` - -## Changing the Data Type of a field - -By default, Umbraco UI Builder will automatically choose a relevant Data Type for basic field types. However, if you wish to use an alternative Data Type then you can override this. - -### **SetDataType(string dataTypeName) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Set the Data Type of the current field to the Umbraco Data Type with the given name. - -````csharp -// Example -fieldConfig.SetDataType("Richtext Editor"); -```` - -### **SetDataType(int dataTypeId) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Set the Data Type of the current field to the Umbraco Data Type with the given id. - -````csharp -// Example -fieldConfig.SetDataType(-88); -```` - -## Setting the default value of a field - -### **SetDefaultValue(TValueType defaultValue) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Sets the default value to a known constant. - -````csharp -// Example -fieldConfig.SetDefaultValue(10); -```` - -### **SetDefaultValue(Func defaultValueFunc) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Sets the default value via a function that gets evaluated at time of entity creation. - -````csharp -// Example -fieldConfig.SetDefaultValue(() => DateTime.Now); -```` - -## Making a field required - -### **MakeRequired() : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the given field required. - -````csharp -// Example -fieldConfig.MakeRequired(); -```` - -## Validating a field - -### **SetValidationRegex(string regex) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Defines the regular expression to use when validating the field. - -````csharp -// Example -fieldConfig.SetValidationRegex("[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}"); -```` - -## Making a field read-only - -### **MakeReadOnly() : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the current field read-only disabling editing in the UI. - -````csharp -// Example -fieldConfig.MakeReadOnly(); -```` - -### **MakeReadOnly(Func<TValueType, string> format) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the current field read-only disabling editing in the UI. Provides a custom formatting expression to use when rendering the value as a string. - -````csharp -// Example -fieldConfig.MakeReadOnly(distanceProp => $"{distanceProp:## 'km'}"); -```` - -### **MakeReadOnly(object dataTypeNameOrId) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the current field read-only disabling editing in the UI. Provides the name or id of a datatype to use when in read-only mode. - -````csharp -// Example -fieldConfig.MakeReadOnly("myReadOnlyEditor"); -```` - -### **MakeReadOnly(Predicate<EditorFieldReadOnlyContext> readOnlyExp) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the current field read-only disabling editing in the UI if the given runtime predicate is true. - -````csharp -// Example -fieldConfig.MakeReadOnly(ctx => ctx.EditorMode == EditorMode.Create); -```` - -### **MakeReadOnly(Predicate<EditorFieldReadOnlyContext> readOnlyExp, Func<TValueType, string> format) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the current field read-only disabling editing in the UI if the given runtime predicate is true. Provides a custom formatting expression to use when rendering the value as a string. - -````csharp -// Example -fieldConfig.MakeReadOnly(ctx => ctx.EditorMode == EditorMode.Create, distanceProp => $"{distanceProp:## 'km'}"); -```` - -### **MakeReadOnly(Predicate<EditorFieldReadOnlyContext> readOnlyExp, object dataTypeNameOrId) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Makes the current field read-only disabling editing in the UI if the given runtime predicate is true. Provides the name or id of a datatype to use when in read-only mode. - -````csharp -// Example -fieldConfig.MakeReadOnly(ctx => ctx.EditorMode == EditorMode.Create, "myReadOnlyEditor"); -```` - -## Setting the visibility of a field - -### **SetVisibility(Predicate<EditorFieldVisibilityContext> visibilityExpression) : EditorFieldConfigBuilder<TEntityType, TValueType>** - -Sets the runtime visibility of the field. - -````csharp -// Example -fieldConfig.SetVisibility(ctx => ctx.EditorMode == EditorMode.Create); -```` diff --git a/10/umbraco-ui-builder/collections/field-views.md b/10/umbraco-ui-builder/collections/field-views.md deleted file mode 100644 index 59a4cd4687a..00000000000 --- a/10/umbraco-ui-builder/collections/field-views.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -description: Configuring field views in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Field Views - -Field Views allow you to customize the markup used by a field when displayed in a list view. Field Views are implemented as .NET Core View Components that are passed a single `FieldViewsContext` argument with information about the entity/field being rendered. - -## Defining a field view - -You can define a field view in one of two ways. - -### **1. A basic view file for the built in `FieldView` view component** - -The simplest way to define a field view for non-complex fields is to place a view file in the `/Views/Shared/Components/FieldView` folder with the following markup. - -````csharp -@model Umbraco.UIBuilder.Web.Models.FieldViewContext - -```` - -When registering a basic file view you can pass the name of the view file (excluding the `.cshtml` file extension) to the relevant API method. - -### **2. A complete custom view component** - -To define a more complex field view you can create your own view component class (which can use dependency injection for any required dependencies). This can be done by using the following signature: - -````csharp -// Example -public class MyComplexFieldViewViewComponent : ViewComponent -{ - public async Task InvokeAsync(FieldViewContext context) - { - // Do your custom logic here - - return View("Default", model); - } -} -```` - -{% hint style="info" %} -It's important to know that the `FieldViewContext` parameter to the `InvokeAsync` method **MUST** be named `context`. -{% endhint %} - -For the view element of your component, based on the example above, you would place a file `Default.cshtml` into the `/Views/Shared/Components/MyComplexFieldView` folder with the following markup: - -````csharp -@model Namespace.Of.Model.Returned.By.Custom.ViewComponent - -```` - -## The field view context - -Field view components are passed a `FieldViewContext` object with the following information: - -````csharp -public class FieldViewContext -{ - public string ViewName { get; set; } - public object Entity { get; set; } - public string PropertyName { get; set; } - public object PropertyValue { get; set; } -} -```` - -## Setting the field view of a list view field - -A field view is assigned to a list view field as part of the list view configuration. For more information you can check the [List View Documentation](list-views.md#setting-the-view-of-a-field). diff --git a/10/umbraco-ui-builder/collections/list-view-layouts.md b/10/umbraco-ui-builder/collections/list-view-layouts.md deleted file mode 100644 index f37338992f0..00000000000 --- a/10/umbraco-ui-builder/collections/list-view-layouts.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -description: Configuring list view layouts in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# List View Layouts - -{% hint style="danger" %} -**List View Layouts** in Umbraco UI Builder are now considered deprecated. Moving forward, only the table list view will be supported. Whilst you can continue to use this feature for the time being, it will be removed in a future release. -{% endhint %} - -List view layouts allow you to provide custom angular views to be used by the list view UI. By default, there are two built-in layouts, `TableListViewLayout` which displays results in a tabular layout, and `GridListViewLayout` which displays results in a tiled grid layout. - -## Defining a list view layout - -To define a list view layout you create a class that inherits from the base class `ListViewLayout` and implements the abstract configuration properties. - -````csharp -// Example -public class MyCustomListViewLayout : ListViewLayout -{ - public GridListViewLayout() - { - Name = "My Custom List"; - Alias = "my-custom-list"; - Icon = "icon-list"; - View = "/app_plugins/myplugin/views/mycustomlist.htm"; - } -} -```` - -The required configuration options are: - -* **Name:** The name of the layout. -* **Alias:** A unique alias for the layout. -* **Icon:** An icon to display in the list view layouts dropdown. -* **View:** The path of the angular view to load by the list view. - -As well as defining the list view layout class you will also need to implement the relevant angular view and controller. This is a little out of scope for the Umbraco UI Builder documentation, however in summary you will need to: - -* Create a plugin folder in the root `App_Plugin` folder. -* Create a `package.manifest` file in your plugin folder. -* Create a HTML view to be loaded. -* Create an angular controller to control the view. -* Hook up the controller with the view using the `ng-controller` attribute. -* Add the controller JS file path to the `package.manifest`. -* Build your custom logic. - -## Changing the list view layout of a list view - -A list view layout is assigned to a list view as part of the list view configuration. For more information you can check the [List View API Documentation](list-views.md#changing-the-list-view-layout). diff --git a/10/umbraco-ui-builder/collections/list-views.md b/10/umbraco-ui-builder/collections/list-views.md deleted file mode 100644 index dcb8e2c3b6c..00000000000 --- a/10/umbraco-ui-builder/collections/list-views.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -description: Configuring the list view of a collection in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# List Views - -A list view is a list-based view of a collection entity providing features: pagination for large collections, custom data views, searching, and bulk actions. - -![A collection list view](../images/people_listview.png) - -## Configuring a list view - -The list view configuration is a sub-configuration of a [`Collection`](the-basics.md) config builder instance and is accessed via its `ListView` method. - -### **ListView(Lambda listViewConfig = null) : ListViewConfigBuilder<TEntityType>** - -Accesses the list view config of the given collection. - -````csharp -// Example -collectionConfig.ListView(listViewConfig => { - ... -}); -```` - -## Adding a field to the list view - -### **AddField(Lambda propertyExpression, Lambda fieldConfig = null) : ListViewFieldConfigBuilder<TEntityType, TValueType>** - -Adds the given property to the list view. - -````csharp -// Example -listViewConfig.AddField(p => p.FirstName, fieldConfig => { - ... -}); -```` - -## Changing the heading of a field - -### **SetHeading(string heading) : ListViewFieldConfigBuilder<TEntityType, TValueType>** - -Sets the heading for the list view field. - -````csharp -// Example -fieldConfig.SetHeading("First Name"); -```` - -## Formatting the value of a field - -### **SetFormat(Lambda formatExpression) : ListViewFieldConfigBuilder<TEntityType, TValueType>** - -Sets the format expression for the list view field. - -````csharp -// Example -fieldConfig.SetFormat((v, p) => $"{v} years old"); -```` - -## Setting the view of a field - -With field views, you can customize the markup the list view's field so you can show richer visualizations of the field's content. For more information you can check the [Field Views Documentation](field-views.md). - -### **SetView(string viewComponentName) : ListViewFieldConfigBuilder<TEntityType, TValueType>** - -Sets the view component for the list view field. - -````csharp -// Example -fieldConfig.SetView("ImageFieldView"); -```` - -### **SetView<TView>() : ListViewFieldConfigBuilder<TEntityType, TValueType>** - -Sets the view component for the list view field. - -````csharp -// Example -fieldConfig.SetView(); -```` - -## Setting the visibility of a field - -### **SetVisibility(Predicate<ListViewFieldVisibilityContext> visibilityExpression) : ListViewFieldConfigBuilder<TEntityType, TValueType>** - -Sets the runtime visibility of the list view field. - -````csharp -// Example -fieldConfig.SetVisibility(ctx => ctx.UserGroups.Any(x => x.Alias == "editor")); -```` - -## Changing the page size - -### **SetPageSize(int pageSize) : ListViewConfigBuilder<TEntityType>** - -Sets the number of items to display per page for the given list view. - -````csharp -// Example -listViewConfig.SetPageSize(20); -```` diff --git a/10/umbraco-ui-builder/collections/overview.md b/10/umbraco-ui-builder/collections/overview.md deleted file mode 100644 index 5889e43395f..00000000000 --- a/10/umbraco-ui-builder/collections/overview.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -description: Configuring collection in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Collections - -A collection is the cornerstone Umbraco UI Builder config and it represents a collection of entities for a given data model. From this config object, you can configure everything about how this collection integrates into the UI. You can also configure how it should display in a list view as well as how it should be edited. - -![A collection list view](../images/people_listview.png) - -Get started by reviewing the basics of collection configuration. - -{% content-ref url="the-basics.md" %} -[the-basics.md](the-basics.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/collections/the-basics.md b/10/umbraco-ui-builder/collections/the-basics.md deleted file mode 100644 index eb7a1ba61a3..00000000000 --- a/10/umbraco-ui-builder/collections/the-basics.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -description: The basics of a collection configuration in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# The Basics - -There is a lot that can be configured from the collection config, but what follows are the core basics. You can find more configuration options about specific topics from the other configuration sections in the main menu. - -## Defining a collection - -You can define a collection by calling one of the `AddCollection` methods on a given [`Tree`](../areas/trees.md) or parent [`Folder`](../areas/folders.md) config builder instance. - -### **AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds a collection to the given container with the given names and description and default icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. - -````csharp -// Example -folderConfig.AddCollection(p => p.Id, "Person", "People", "A collection of people", collectionConfig => { - ... -}); -```` - -### **AddCollection<TEntityType>(Lambda idFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds a collection to the given container with the given names, description and icons. An ID property accessor expression is required so that Umbraco UI Builder knows which property is the ID property. - -````csharp -// Example -folderConfig.AddCollection(p => p.Id, "Person", "People", "A collection of people", "icon-umb-users", "icon-umb-users", collectionConfig => { - ... -}); -```` - -## Changing a collection alias - -### **SetAlias(string alias) : CollectionConfigBuilder<TEntityType>** - -Sets the alias of the collection. - -**Optional:** When creating a new collection, an alias is automatically generated from the supplied name for you. However, if you need a specific alias you can use the `SetAlias` method to override this. - -````csharp -// Example -collectionConfig.SetAlias("person"); -```` - -## Changing a collection icon color - -### **SetIconColor(string color) : CollectionConfigBuilder<TEntityType>** - -Sets the collection icon color to the given color. Possible options are `black`, `green`, `yellow`, `orange`, `blue` or `red`. - -````csharp -// Example -collectionConfig.SetIconColor("blue"); -```` - -## Defining an entity name - -Within Umbraco, it is expected that an entity has a name property. So we need to let Umbraco UI Builder know which property to use for the name. If the entity doesn't have a name property, then it needs to know how to construct a name from an entity's other properties. We do this by using either the `SetNameProperty` or `SetNameFormat` methods on a `Collection` config builder instance. - -### **SetNameProperty(Lambda namePropertyExpression) : CollectionConfigBuilder<TEntityType>** - -Sets which property of your entity to use as the name property. Property must be of type `string`. By defining a property as the name property, its value will be used as the label for the entity in trees and list views. It will also be editable in the header region of the editor interface. The property will also automatically be added to the searchable properties collection and be used for the default sort property. - -````csharp -// Example -collectionConfig.SetNameProperty(p => p.Name); -```` - -### **SetNameFormat(Lambda nameFormatExpression) : CollectionConfigBuilder<TEntityType>** - -Sets a format expression to use to dynamically create a label for the entity in things like trees and list views. By providing a name format it is assumed there is no single name property available on the entity. And as such none of the default behaviors described for the `SetNameProperty` method will apply. - -````csharp -// Example -collectionConfig.SetNameFormat(p => $"{p.FirstName} {p.LastName}"); -```` - -## Defining a default sort order - -### **SetSortProperty(Lambda sortPropertyExpression) : CollectionConfigBuilder<TEntityType>** - -Sets which property of our entity to sort against, defaulting to ascending sort direction. - -````csharp -// Example -collectionConfig.SetSortProperty(p => p.FirstName); -```` - -### **SetSortProperty(Lambda sortPropertyExpression, SortDirection sortDirection) : CollectionConfigBuilder<TEntityType>** - -Sets which property of our entity to sort against in the provided sort direction. - -````csharp -// Example -collectionConfig.SetSortProperty(p => p.FirstName, SortDirection.Descending); -```` - -## Defining time stamp properties - -### **SetDateCreatedProperty(Lambda dateCreatedProperty) : CollectionConfigBuilder<TEntityType>** - -Sets which property of our entity to use as the date created property. Property must be of type `DateTime`. When set and a new entity is saved via the repository, then the given field will be populated with the current date and time. - -````csharp -// Example -collectionConfig.SetDateCreatedProperty(p => p.DateCreated); -```` - -### **SetDateModifiedProperty(Lambda dateCreatedProperty) : CollectionConfigBuilder<TEntityType>** - -Sets which property of our entity to use as the date modified property. Property must be of type `DateTime`. When set and an entity is saved via the repository, then the given field will be populated with the current date and time. - -````csharp -// Example -collectionConfig.SetDateModifiedProperty(p => p.DateModified); -```` - -## Configuring soft deletes - -By default, in Umbraco UI Builder any entity that is deleted via the Umbraco UI Builder repository is definitively removed from the system. The `SetDeletedProperty` method can be used if needed to keep the records in the data repository despite having them marked as deleted. This is so they do not show the the UI. - -### **SetDeletedProperty(Lambda deletedPropertyExpression) : CollectionConfigBuilder<TEntityType>** - -Sets which property of our entity to use as the deleted property flag. Property must be of type `boolean` or `int`. When a deleted property is set, any delete actions will set the deleted flag instead of deleting the entity. For `boolean` based properties, deleted entities will have a value of `True` when deleted. For `int` based properties, deleted entities will have a UTC Unix timestamp value of the date the entity was deleted. In addition, any fetch actions will also pre-filter out any deleted entities. - -````csharp -// Example -collectionConfig.SetDeletedProperty(p => p.Deleted); -```` - -## Disabling create, update or delete features - -### **DisableCreate() : CollectionConfigBuilder<TEntityType>** - -Disables the option to create entities on the current collection. An entity could be created via code and only then editing is allowed in the UI for example. - -````csharp -// Example -collectionConfig.DisableCreate(); -```` - -### **DisableCreate(Predicate<CollectionPermissionContext> disableExpression) : CollectionConfigBuilder<TEntityType>** - -Disables the option to create entities on the current collection if the given runtime predicate is true. An entity could be created via code and only then editing is allowed in the UI. - -````csharp -// Example -collectionConfig.DisableCreate(ctx => ctx.UserGroups.Any(x => x.Alias == "editor")); -```` - -### **DisableUpdate() : CollectionConfigBuilder<TEntityType>** - -Disables the option to update entities on the current collection. An entity can be created, but further editing is not allowed. - -````csharp -// Example -collectionConfig.DisableUpdate(); -```` - -### **DisableUpdate(Predicate<CollectionPermissionContext> disableExpression) : CollectionConfigBuilder<TEntityType>** - -Disables the option to update entities on the current collection if the given runtime predicate is true. An entity can be created, but further editing is not allowed. - -````csharp -// Example -collectionConfig.DisableUpdate(ctx => ctx.UserGroups.Any(x => x.Alias == "editor")); -```` - -### **DisableDelete() : CollectionConfigBuilder<TEntityType>** - -Disables the option to delete entities on the current collection. Useful if the data needs to be retained and visible. See also [configuring soft deletes](#configuring-soft-deletes). - -````csharp -// Example -collectionConfig.DisableDelete(); -```` - -### **DisableDelete(Predicate<CollectionPermissionContext> disableExpression) : CollectionConfigBuilder<TEntityType>** - -Disables the option to delete entities on the current collection if the given runtime predicate is true. Useful if the data needs to be retained and visible. See also [configuring soft deletes](#configuring-soft-deletes). - -````csharp -// Example -collectionConfig.DisableDelete(ctx => ctx.UserGroups.Any(x => x.Alias == "editor")); -```` - -### **MakeReadOnly() : CollectionConfigBuilder<TEntityType>** - -Sets the collection as read-only and disables any Create, Read, Update, and Delete (CRUD) operations from being performed on the collection via the UI. - -````csharp -// Example -collectionConfig.MakeReadOnly(); -```` - -### **MakeReadOnly(Predicate<CollectionPermissionContext> disableExpression) : CollectionConfigBuilder<TEntityType>** - -Sets the collection as read-only if the given runtime predicate is true. It also disables any Create, Read, Update, and Delete (CRUD) operations from being performed on the collection via the UI. - -````csharp -// Example -collectionConfig.MakeReadOnly(ctx => ctx.UserGroups.Any(x => x.Alias == "editor")); -```` - -## Set the visibility of the collection - -### **SetVisibility(Predicate<CollectionVisibilityContext> visibilityExpression) : CollectionConfigBuilder<TEntityType>** - -Sets the runtime visibility of the collection. - -````csharp -// Example -collectionConfig.SetVisibility(ctx => ctx.UserRoles.Any(x => x.Alias == "editor")); -```` - -## Changing a collection connection string - -By default, Umbraco UI Builder will use the Umbraco connection string for its database connection. However, you can change this by calling the `SetConnectionString` method on a `Collection` config builder instance. - -### **SetConnectionString(string connectionStringName) : CollectionConfigBuilder<TEntityType>** - -Sets the connection string name for the given collection repository. - -````csharp -// Example -collectionConfig.SetConnectionString("myConnectionStringName"); -```` diff --git a/10/umbraco-ui-builder/filtering/data-views-builders.md b/10/umbraco-ui-builder/filtering/data-views-builders.md deleted file mode 100644 index 5803cadcd52..00000000000 --- a/10/umbraco-ui-builder/filtering/data-views-builders.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -description: Configuring data views builders in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Data Views Builders - -Data views builders allow you to create a collection data views list dynamically at run time. By default, Umbraco UI Builder will use the hard-coded data views defined in your Umbraco UI Builder config. However, if you need to build your data views list dynamically, then this is when you'd use a data views builder. - -When Umbraco UI Builder resolves a data views builder it will attempt to do so from the global DI container. This means you can inject any dependencies that you require for your builder. If there is no type defined in the DI container, Umbraco UI Builder will fall-back to manually instantiating a new instance of value mapper. - -## Defining a data views builder - -To define a data views builder you can create a class that inherits from the base class `DataViewsBuilder` and implements the abstract methods. - -````csharp -// Example -public class PersonDataViewsBuilder : DataViewsBuilder -{ - public override IEnumerable GetDataViews() - { - // Generate and return a list of data views - } - - public override Expression> GetDataViewWhereClause(string dataViewAlias) - { - // Return a where clause expression for the supplied data view alias - } -} -```` - -The required methods are: - -* **GetDataViews:** Returns the list of data views to choose from. -* **GetDataViewWhereClause:** Returns the boolean **where clause** expression for the given data views alias. - -## Setting the data views builder of a collection - -Setting a data views builder is controlled via the [collections](../collections/overview.md) configuration. - -### **SetDataViewsBuilder<TDataViewsBuilder>() : CollectionConfigBuilder<TEntityType>** - -Sets the collections data views builder which allows you to define the data views dynamically at run time. - -````csharp -// Example -collectionConfig.SetDataViewsBuilder(); -```` - -### **SetDataViewsBuilder(Type dataViewsBuilderType) : CollectionConfigBuilder<TEntityType>** - -Sets the collections data views builder which allows you to define the data views dynamically at run time. - -````csharp -// Example -collectionConfig.SetDataViewsBuilder(typeof(PersonDataViewsBuilder)); -```` - -### **SetDataViewsBuilder(DataViewsBuilder<TEntityType> dataViewsBuilder) : CollectionConfigBuilder<TEntityType>** - -Sets the collections data views builder which allows you to define the data views dynamically at run time. - -````csharp -// Example -collectionConfig.SetDataViewsBuilder(new PersonDataViewsBuilder()); -```` diff --git a/10/umbraco-ui-builder/filtering/data-views.md b/10/umbraco-ui-builder/filtering/data-views.md deleted file mode 100644 index e35edbcc384..00000000000 --- a/10/umbraco-ui-builder/filtering/data-views.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -description: Configuring data views in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Data Views - -Data views allow you to define multiple, pre-filtered views of the same data source. This can be useful when entities exist in different states and you want a way to toggle between them. - -![Data Views](../images/data_views.png) - -## Defining data views - -Data views are defined via the [collections](../collections/overview.md) configuration. - -### **AddDataView(string name, Lambda whereClauseExpression) : CollectionConfigBuilder<TEntityType>** - -Adds a data view with the given name and **where clause** filter expression. Expression must be a `boolean` expression. - -````csharp -// Example -collectionConfig.AddDataView("Active", p => p.IsActive); -```` - -### **AddDataView(string group, string name, Lambda whereClauseExpression) : CollectionConfigBuilder<TEntityType>** - -Adds a data view with the given group, name and **where clause** filter expression. Expression must be a `boolean` expression. - -````csharp -// Example -collectionConfig.AddDataView("Status", "Active", p => p.IsActive); -```` diff --git a/10/umbraco-ui-builder/filtering/filterable-properties.md b/10/umbraco-ui-builder/filtering/filterable-properties.md deleted file mode 100644 index 0c61d0b18e4..00000000000 --- a/10/umbraco-ui-builder/filtering/filterable-properties.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -description: Configuring filterable properties in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Filterable Properties - -Umbraco UI Builder can dynamically build a filter dialog choosing appropriate editor views for you based on a basic property configuration. Properties of a number or date types will become range pickers and enums. Properties with options defined will become select/checkbox lists and all other properties will become text input filters. - -![Filterable Properties](../images/filterable_properties.png) - -## Defining filterable properties - -Defining filterable properties is controlled via the [collections](../collections/overview.md) configuration. - -### **AddFilterableProperty(Lambda filterablePropertyExpression, Lambda filterConfig = null) : CollectionConfigBuilder<TEntityType>** - -Adds the given property to the filterable properties collection. - -````csharp -// Example -collectionConfig.AddFilterableProperty(p => p.FirstName, filterConfig => filterConfig - // ... -); -```` - -## Changing the label of a filterable property - -### **SetLabel(string label) : FilterablePropertyConfigBuilder<TEntityType, TValueType>** - -````csharp -// Example -filterConfig.SetLabel("First Name"); -```` - -## Adding a description to a filterable property - -### **SetDescription(string description) : FilterablePropertyConfigBuilder<TEntityType, TValueType>** - -````csharp -// Example -filterConfig.SetDescription("The first name of the person"); -```` - -## Defining basic options for a filterable property - -### **SetOptions(IDictionary<TValueType, string> options) : FilterablePropertyConfigBuilder<TEntityType, TValueType>** - -````csharp -// Example -filterConfig.SetOptions(new Dictionary { - { "Option1", "Option One" }, - { "Option2", "Option Two" } -}); -```` - -## Defining options with custom compare clauses for a filterable property - -### **AddOption(object key, string label, Lambda compareExpression) : FilterablePropertyConfigBuilder<TEntityType, TValueType>** - -````csharp -// Example -filterConfig.AddOption("Option1", "Option One", (val) => val != "Option Two"); -```` - -## Configuring the mode of a filterable property - -For filterable properties with options you can configure whether the options should be multiple or single choice. - -### **SetMode(FilterMode mode) : FilterablePropertyConfigBuilder<TEntityType, TValueType>** - -````csharp -// Example -filterConfig.SetMode(FilterMode.MultipleChoice); -```` diff --git a/10/umbraco-ui-builder/filtering/global-filters.md b/10/umbraco-ui-builder/filtering/global-filters.md deleted file mode 100644 index 6ead9ff183f..00000000000 --- a/10/umbraco-ui-builder/filtering/global-filters.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -description: Configuring a global filter in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Global Filters - -If you want to work with a subset of data within a given collection then this is where the global filters come in handy. These allow you to define a filter to apply to all queries for a given collection. - -## Applying a global filter - -Applying a global filter is controlled via the [collections](../collections/overview.md) configuration. - -### **SetFilter(Lambda whereClauseExpression) : CollectionConfigBuilder<TEntityType>** - -Sets the filter **where clause** expression. Expression must be a `boolean` expression. - -````csharp -// Example -collectionConfig.SetFilter(p => p.Current); -```` diff --git a/10/umbraco-ui-builder/filtering/overview.md b/10/umbraco-ui-builder/filtering/overview.md deleted file mode 100644 index 3721654078b..00000000000 --- a/10/umbraco-ui-builder/filtering/overview.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -description: Configuring filtering in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Filtering - -Beyond [searching](../searching/overview.md) there might be times when you need to be able to create specific views of a collection's data. To help with this Umbraco UI Builder has different filtering mechanisms available. - -![Filterable Properties](../images/filterable_properties.png) - -Choose a filtering method from the list below to find out more. - -{% content-ref url="global-filters.md" %} -[global-filters.md](global-filters.md) -{% endcontent-ref %} -{% content-ref url="data-views.md" %} -[data-views.md](data-views.md) -{% endcontent-ref %} -{% content-ref url="filterable-properties.md" %} -[filterable-properties.md](filterable-properties.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/getting-started/configuration.md b/10/umbraco-ui-builder/getting-started/configuration.md deleted file mode 100644 index cf5e6ac52bf..00000000000 --- a/10/umbraco-ui-builder/getting-started/configuration.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -description: Configuring Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Configuration - -Umbraco UI Builder can be configured directly via the `AddUIBuilder` extension method on `IUmbracoBuilder`. - -## AddUIBuilder - -To configure Umbraco UI Builder via the `AddUIBuilder` extension method, you can extend the `ConfigureServices` method found in the `Startup.cs` file in the root of your web project. From within this method, before the call to `AddComposers()` we can add our `AddUIBuilder` configuration. - -```csharp -public class Startup -{ - ... - public void ConfigureServices(IServiceCollection services) - { - services.AddUmbraco(_env, _config) - .AddBackOffice() - .AddWebsite() - .AddUIBuilder(cfg => { - // Apply your configuration here - }) - .AddComposers() - .Build(); - } - ... -} - -``` - -The `AddUIBuilder` extension method accepts a single parameter, a delegate function with one of the Umbraco UI Builder configuration builder arguments. With this, you can then call the relevant fluent APIs to define your solution. diff --git a/10/umbraco-ui-builder/getting-started/overview.md b/10/umbraco-ui-builder/getting-started/overview.md deleted file mode 100644 index 0dd186f3b98..00000000000 --- a/10/umbraco-ui-builder/getting-started/overview.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -description: >- - Getting Started with Umbraco UI Builder, the backoffice UI builder for - Umbraco. ---- - -# Overview - -This section will guide you through the key steps necessary to get you started with Umbraco UI Builder. - -It is assumed that you have an Umbraco 10+ website configured, and ready to install Umbraco UI Builder. - -{% hint style="info" %} -Find detailed instructions on how to install the latest version of Umbraco in the [Umbraco CMS documentation](https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install). -{% endhint %} - -## System Requirements - -At this time, the minimum requirements for using Umbraco UI Builder are as follows: - -* **Umbraco CMS version 10.0/12.0+** -* **SQL Server Database** (SQLite is fine for testing, but not recommended for live deployments) - -## Versioning - -This is an add-on product to Umbraco CMS. Umbraco UI Builder follows the [versioning strategy laid out for Umbraco CMS](https://umbraco.com/products/knowledge-center/versioning-and-release-cadence/). diff --git a/10/umbraco-ui-builder/getting-started/user-interface.md b/10/umbraco-ui-builder/getting-started/user-interface.md deleted file mode 100644 index 5f7b92fc6b1..00000000000 --- a/10/umbraco-ui-builder/getting-started/user-interface.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -description: Key User Interface Concepts used by Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# User Interface - -Before you get to know Umbraco UI Builder, you need to become familiar with the Umbraco UI and a few of its concepts. This is because Umbraco UI Builder reuses these same concepts for constructing its UI. - -![Sections, Trees, and Dashboards](../images/ui_01.png) - -**1. Section** A distinct area of the Umbraco backoffice. -**2. Tree** A hierarchical structure to help organize a section. -**3. Dashboard** An intro screen for a section, usually with useful links for that section. - -![List View](../images/ui_02.png) - -**4. List View** A list-based view of items in a tree node. - -![Editor](../images/ui_03.png) - -**5. Editor** The main content editing area is made up of tabs, fieldsets, and fields. - -![Context Apps and Tabs](../images/ui_06.png) - -**6. Context Apps** A contextual section of a given editor UI. -**7. Tabs** A tabbed container of content. - -![Menu Item](../images/ui_04.png) - -**8. Menu Item** A context menu item + action. - -![Bulk Action](../images/ui_05.png) - -**9. Bulk Action** An action to perform on multiple list view items at once. diff --git a/10/umbraco-ui-builder/guides/creating-your-first-integration.md b/10/umbraco-ui-builder/guides/creating-your-first-integration.md deleted file mode 100644 index ccc9fa56258..00000000000 --- a/10/umbraco-ui-builder/guides/creating-your-first-integration.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -description: Creating your first integration with Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Creating your first integration - -In this guide, you can find the necessary steps needed for a basic implementation using Umbraco UI Builder to manage a single custom database table. - -## Set up the database - -Out of the box, Umbraco UI Builder works using PetaPoco as the persistence layer as this is what ships with Umbraco. If you prefer, it is possible to use a custom [Repository](../advanced/repositories.md). However, for getting started, it is expected that you are using this default strategy. - -Start by setting up a database table for your model (you might want to populate it with some dummy data as well while learning). We’ll use the following as an example: - -```sql -CREATE TABLE [Person] ( - [Id] int IDENTITY (1,1) NOT NULL, - [Name] nvarchar(255) NOT NULL, - [JobTitle] nvarchar(255) NOT NULL, - [Email] nvarchar(255) NOT NULL, - [Telephone] nvarchar(255) NOT NULL, - [Age] int NOT NULL, - [Avatar] nvarchar(255) NOT NULL -); -``` - -## Set up your model - -With the database table setup, we then need to create the associated Poco model in our project. - -```csharp -[TableName("Person")] -[PrimaryKey("Id")] -public class Person -{ - [PrimaryKeyColumn] - public int Id { get; set; } - public string Name { get; set; } - public string JobTitle { get; set; } - public string Email { get; set; } - public string Telephone { get; set; } - public int Age { get; set; } - public string Avatar { get; set; } -} -``` - -## Configure Umbraco UI Builder - -With the database and model setup, we can now start to configure Umbraco UI Builder itself. The entry point for the Umbraco UI Builder configuration is via the `AddUIBuilder` extension method. On this method, we call on the `IUmbracoBuilder` instance within the `ConfigureServices` method of the `Startup` class. - -```csharp -public class Startup -{ - ... - public void ConfigureServices(IServiceCollection services) - { - services.AddUmbraco(_env, _config) - .AddBackOffice() - .AddWebsite() - .AddUIBuilder(cfg => { - // Apply your configuration here - }) - .AddComposers() - .Build(); - } - ... -} -``` - -For our example, we will use the following configuration: - -```csharp -... -.AddUIBuilder(cfg => { - - cfg.AddSectionAfter("media", "Repositories", sectionConfig => sectionConfig - .Tree(treeConfig => treeConfig - .AddCollection(x => x.Id, "Person", "People", "A person entity", "icon-umb-users", "icon-umb-users", collectionConfig => collectionConfig - .SetNameProperty(p => p.Name) - .ListView(listViewConfig => listViewConfig - .AddField(p => p.JobTitle).SetHeading("Job Title") - .AddField(p => p.Email) - ) - .Editor(editorConfig => editorConfig - .AddTab("General", tabConfig => tabConfig - .AddFieldset("General", fieldsetConfig => fieldsetConfig - .AddField(p => p.JobTitle).MakeRequired() - .AddField(p => p.Age) - .AddField(p => p.Email).SetValidationRegex("[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+") - .AddField(p => p.Telephone).SetDescription("inc area code") - ) - .AddFieldset("Media", fieldsetConfig => fieldsetConfig - .AddField(p => p.Avatar).SetDataType("Upload File") - ) - ) - ) - ) - ) - ); - -}) -... -``` - -## Access your UI - -With your configuration defined and your project compiled, there is one last step to perform before you can access your UI. And that is to give your backoffice user account permission to access the newly defined section. To do this you'll need to login to the backoffice, head to the user's section, and update the user group. There you will need to make sure that your user belongs to the allowed access. - -![User group permissions](../images/permissions.png) - -With the permissions set, you can refresh your browser and you should now see your new section available in the site navigation. - -![People list view](../images/people_listview.png) - -![People editor](../images/people_editor.png) - -## Summary - -As you can see, with little code you can start to create powerful interfaces for your custom data structures. diff --git a/10/umbraco-ui-builder/images/bulk_actions.png b/10/umbraco-ui-builder/images/bulk_actions.png deleted file mode 100644 index 1da73b7c43f..00000000000 Binary files a/10/umbraco-ui-builder/images/bulk_actions.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/bulk_actions_menu.png b/10/umbraco-ui-builder/images/bulk_actions_menu.png deleted file mode 100644 index 877720ad906..00000000000 Binary files a/10/umbraco-ui-builder/images/bulk_actions_menu.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/cards.png b/10/umbraco-ui-builder/images/cards.png deleted file mode 100644 index 7eb35307fe5..00000000000 Binary files a/10/umbraco-ui-builder/images/cards.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/child_collection_groups.png b/10/umbraco-ui-builder/images/child_collection_groups.png deleted file mode 100644 index 4cb9e5ca297..00000000000 Binary files a/10/umbraco-ui-builder/images/child_collection_groups.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/child_collections.png b/10/umbraco-ui-builder/images/child_collections.png deleted file mode 100644 index 53034bf5799..00000000000 Binary files a/10/umbraco-ui-builder/images/child_collections.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/comments_listview.png b/10/umbraco-ui-builder/images/comments_listview.png deleted file mode 100644 index 79f51b9b5e4..00000000000 Binary files a/10/umbraco-ui-builder/images/comments_listview.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/container_actions_menu.png b/10/umbraco-ui-builder/images/container_actions_menu.png deleted file mode 100644 index 1e6871db48d..00000000000 Binary files a/10/umbraco-ui-builder/images/container_actions_menu.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/content_apps.png b/10/umbraco-ui-builder/images/content_apps.png deleted file mode 100644 index 54d710ac9cc..00000000000 Binary files a/10/umbraco-ui-builder/images/content_apps.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/context_app.png b/10/umbraco-ui-builder/images/context_app.png deleted file mode 100644 index 5f12e0e068d..00000000000 Binary files a/10/umbraco-ui-builder/images/context_app.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/dashboard.png b/10/umbraco-ui-builder/images/dashboard.png deleted file mode 100644 index 17563050546..00000000000 Binary files a/10/umbraco-ui-builder/images/dashboard.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/dashboards.png b/10/umbraco-ui-builder/images/dashboards.png deleted file mode 100644 index f74249050fc..00000000000 Binary files a/10/umbraco-ui-builder/images/dashboards.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/data_views.png b/10/umbraco-ui-builder/images/data_views.png deleted file mode 100644 index 19398c19797..00000000000 Binary files a/10/umbraco-ui-builder/images/data_views.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/editor.png b/10/umbraco-ui-builder/images/editor.png deleted file mode 100644 index edf1154754a..00000000000 Binary files a/10/umbraco-ui-builder/images/editor.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/entity_actions_menu.png b/10/umbraco-ui-builder/images/entity_actions_menu.png deleted file mode 100644 index 2757026dd17..00000000000 Binary files a/10/umbraco-ui-builder/images/entity_actions_menu.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/entity_picker_config.png b/10/umbraco-ui-builder/images/entity_picker_config.png deleted file mode 100644 index 048ff76cc62..00000000000 Binary files a/10/umbraco-ui-builder/images/entity_picker_config.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/entity_picker_picked.png b/10/umbraco-ui-builder/images/entity_picker_picked.png deleted file mode 100644 index 1dcd838a49c..00000000000 Binary files a/10/umbraco-ui-builder/images/entity_picker_picked.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/entity_picker_search.png b/10/umbraco-ui-builder/images/entity_picker_search.png deleted file mode 100644 index afab0f52dca..00000000000 Binary files a/10/umbraco-ui-builder/images/entity_picker_search.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/entity_picker_setup.png b/10/umbraco-ui-builder/images/entity_picker_setup.png deleted file mode 100644 index b9ffe5a80bb..00000000000 Binary files a/10/umbraco-ui-builder/images/entity_picker_setup.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/filterable_properties.png b/10/umbraco-ui-builder/images/filterable_properties.png deleted file mode 100644 index e47add24c41..00000000000 Binary files a/10/umbraco-ui-builder/images/filterable_properties.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/konstrukt.png b/10/umbraco-ui-builder/images/konstrukt.png deleted file mode 100644 index 4efbf6edde6..00000000000 Binary files a/10/umbraco-ui-builder/images/konstrukt.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/listview.png b/10/umbraco-ui-builder/images/listview.png deleted file mode 100644 index 4b7aeae2203..00000000000 Binary files a/10/umbraco-ui-builder/images/listview.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/menu_items.png b/10/umbraco-ui-builder/images/menu_items.png deleted file mode 100644 index 3662552ba18..00000000000 Binary files a/10/umbraco-ui-builder/images/menu_items.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/people_editor.png b/10/umbraco-ui-builder/images/people_editor.png deleted file mode 100644 index 1abee38f776..00000000000 Binary files a/10/umbraco-ui-builder/images/people_editor.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/people_listview.png b/10/umbraco-ui-builder/images/people_listview.png deleted file mode 100644 index 80efd5284e6..00000000000 Binary files a/10/umbraco-ui-builder/images/people_listview.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/permissions.png b/10/umbraco-ui-builder/images/permissions.png deleted file mode 100644 index db02498e73f..00000000000 Binary files a/10/umbraco-ui-builder/images/permissions.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/row_actions_menu.png b/10/umbraco-ui-builder/images/row_actions_menu.png deleted file mode 100644 index 9874172a29e..00000000000 Binary files a/10/umbraco-ui-builder/images/row_actions_menu.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/save_actions_menu.png b/10/umbraco-ui-builder/images/save_actions_menu.png deleted file mode 100644 index cf818ba674a..00000000000 Binary files a/10/umbraco-ui-builder/images/save_actions_menu.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/search.png b/10/umbraco-ui-builder/images/search.png deleted file mode 100644 index 95bf803bda5..00000000000 Binary files a/10/umbraco-ui-builder/images/search.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/section_dashboard.png b/10/umbraco-ui-builder/images/section_dashboard.png deleted file mode 100644 index 2d08c0b5e4b..00000000000 Binary files a/10/umbraco-ui-builder/images/section_dashboard.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/sections.png b/10/umbraco-ui-builder/images/sections.png deleted file mode 100644 index bfcea850b44..00000000000 Binary files a/10/umbraco-ui-builder/images/sections.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/tree.png b/10/umbraco-ui-builder/images/tree.png deleted file mode 100644 index c9956e07e08..00000000000 Binary files a/10/umbraco-ui-builder/images/tree.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/ui_01.png b/10/umbraco-ui-builder/images/ui_01.png deleted file mode 100644 index ac15c165bd9..00000000000 Binary files a/10/umbraco-ui-builder/images/ui_01.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/ui_02.png b/10/umbraco-ui-builder/images/ui_02.png deleted file mode 100644 index dd7e6610094..00000000000 Binary files a/10/umbraco-ui-builder/images/ui_02.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/ui_03.png b/10/umbraco-ui-builder/images/ui_03.png deleted file mode 100644 index b7024f5a0ad..00000000000 Binary files a/10/umbraco-ui-builder/images/ui_03.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/ui_04.png b/10/umbraco-ui-builder/images/ui_04.png deleted file mode 100644 index c22e7b82fe1..00000000000 Binary files a/10/umbraco-ui-builder/images/ui_04.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/ui_05.png b/10/umbraco-ui-builder/images/ui_05.png deleted file mode 100644 index 54552b1c2cf..00000000000 Binary files a/10/umbraco-ui-builder/images/ui_05.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/ui_06.png b/10/umbraco-ui-builder/images/ui_06.png deleted file mode 100644 index 9eeddc5c48f..00000000000 Binary files a/10/umbraco-ui-builder/images/ui_06.png and /dev/null differ diff --git a/10/umbraco-ui-builder/images/virtual-sub-tree.png b/10/umbraco-ui-builder/images/virtual-sub-tree.png deleted file mode 100644 index a2d4f5763b1..00000000000 Binary files a/10/umbraco-ui-builder/images/virtual-sub-tree.png and /dev/null differ diff --git a/10/umbraco-ui-builder/installation/installation.md b/10/umbraco-ui-builder/installation/installation.md deleted file mode 100644 index a92e0322301..00000000000 --- a/10/umbraco-ui-builder/installation/installation.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -description: Installing Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Installation - -Umbraco UI Builder is installed via the NuGet package manager by issuing the following command in your web project. - -```bash -dotnet add package Umbraco.UIBuilder -``` - -If you wish to install Umbraco UI Builder into a class library without the UI elements, you can add a reference to the `Umbraco.UIBuilder.Startup` package instead. - -```bash -dotnet add package Umbraco.UIBuilder.Startup -``` - -Alternatively, you can also find and install the NuGet package via the NuGet Package Manager graphical user interface (GUI) in Visual Studio. - -## Installing a License - -See the [Licensing page](licensing-model.md#installing-your-license) for details on how to install a license. diff --git a/10/umbraco-ui-builder/installation/licensing-model.md b/10/umbraco-ui-builder/installation/licensing-model.md deleted file mode 100644 index e6354300144..00000000000 --- a/10/umbraco-ui-builder/installation/licensing-model.md +++ /dev/null @@ -1,128 +0,0 @@ -# Licensing - -Umbraco UI Builder is a commercial product. You can run an Umbraco UI Builder unrestricted locally without the need a license. Running Umbraco UI Builder on a public domain will display a warning banner in the backoffice and will limit usage to a single editable collection. To remove these restrictions, you'll need to have a **valid license**. - -## How does it work? - -Licenses are sold per backoffice domain and will also work on all subdomains. If you have alternative staging/qa environment domains, additional domains can be added to the license on request. - -{% hint style="info" %} -The licenses are not bound to a specific product version. They will work for all versions of the related product. -{% endhint %} - -Let's say that you have a license configured for your domain, `mysite.com`, and you've requested two development domains, `devdomain.com` and `devdomain2.com`. - -The license will cover the following domains: - -* `localhost` -* `*.local` -* `*.mysite.com` -* `www.mysite.com` -* `devdomain.com` -* `www.devdomain.com` -* `devdomain2.com` -* `www.devdomain2.com` - -{% hint style="info" %} -You can have only 1 license per Umbraco installation. -{% endhint %} - -## What does a license cover? - -There are a few differences as to what the licenses cover: - -* A single license covers the installation of Umbraco UI Builder in 1 production backoffice domain, as well as in any requested development domains. -* The production domain includes **all subdomains** (e.g. `*.mysite.com`). -* The development domains work with or without the `www` subdomain. -* The license allows for an unlimited number of editable collections. -* The license also includes `localhost` and `*.local` as a valid domain. - -{% hint style="info" %} -If you have multiple backoffice domains pointing at the same installation, you can purchase and [add **additional domains**](licensing-model.md#add-additional-domains) to your license. - -This is an add-on domain for existing licenses. Refunds will not be given for this product. -{% endhint %} - -## Configuring your license - -You can look at the pricing, features, and purchase a license on the [Umbraco UI Builder](https://umbraco.com/products/add-ons/ui-builder/) page. On this page, you can fill out the form with your project details and requirements. A member of the Sales team will manage this process. In the process, you will need to provide all domains you wish to have covered by the license such as primary and staging/QA domains. You should then receive a license code to be installed in your solution. - -### Add additional domains - -If you require to add additional domains to the license, [reach out to the sales team](https://umbraco.com/products/add-ons/ui-builder/). They will manage your request and take care of the process. - -## Installing your license - -Once you have received your license code it needs to be installed on your site. - -1. Open the root directory for your project files. -2. Locate and open the `appSettings.json` file. -3. Add your Umbraco Commerce license key to `Umbraco:Licenses:Umbraco.UIBuilder`: - -```json -"Umbraco": { - "Licenses": { - "Umbraco.UIBuilder": "YOUR_LICENSE_KEY" - } -} -``` - -{% hint style="info" %} -You might run into issues when using a period in the product name when using environment variables. Use an underscore in the product name instead, to avoid problems. - -```json -"Umbraco_UIBuilder": "YOUR_LICENSE_KEY" -``` -{% endhint %} - -### Verify the license installation - -You can verify that your license is successfully installed by logging into your project's backoffice and navigating to the settings section. Here you will see a license dashboard which should display the status of your license. - -### Validating a license without an outgoing Internet connection - -Some Umbraco installations will have a highly locked down production environment, with firewall rules that prevent outgoing HTTP requests. This will interfere with the normal process of license validation. - -On start-up, and periodically whilst Umbraco is running, the license component used by Umbraco UIBuilder will make an HTTP POST request to `https://license-validation.umbraco.com/api/ValidateLicense`. - -If it's possible to do so, the firewall rules should be adjusted to allow this request. - -If such a change is not feasible, there is another approach you can use. - -You will need to have a server, or serverless function, that is running and can make a request to the online license validation service. That needs to run on a daily schedule, making a request and relaying it onto the restricted Umbraco environment. - -To set this up, firstly ensure you have a reference to `Umbraco.Licenses` version 10.1 or higher. If the version of UIBuilder you are using depends on an earlier version, you can add a direct package reference for `Umbraco.Licenses`. - -Then configure a random string as an authorization key in configuration. This is used as protection to ensure only valid requests are handled. You can also disable the normal regular license checks - as there is no point in these running if they will be blocked: - -```json - "Umbraco": { - "Licenses": { - "Umbraco.UIBulder": "" - }, - "LicensesOptions": { - "EnableScheduledValidation": false, - "ValidatedLicenseRelayAuthKey": "" - } -``` - -Your Internet enabled server should make a request of the following form to the online license validation service: - -``` -POST https://license-validation.umbraco.com/api/ValidateLicense -{ - "ProductId": "Umbraco.UIBulder", - "LicenseKey": "", - "Domain": "" -} -``` - -The response should be relayed exactly via an HTTP request to your restricted Umbraco environment: - -``` -POST http:///umbraco/licenses/validatedLicense/relay?productId=&licenseKey= -``` - -A header with a key of `X-AUTH-KEY` and value of the authorization key you have configured should be provided. - -This will trigger the same processes that occur when the normal scheduled validation completes ensuring your product is considered licensed. diff --git a/10/umbraco-ui-builder/known-issues.md b/10/umbraco-ui-builder/known-issues.md deleted file mode 100644 index e26f41263ab..00000000000 --- a/10/umbraco-ui-builder/known-issues.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -description: Known issues in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Known Issues - -Umbraco UI Builder tries its best to mimic the content pipeline as closely as possible whilst sticking to public and supported APIs. This is so that the Data Type suite can be used fully for editing properties. There are some features in the Umbraco Core that are locked away in internal methods. This means that some features may not be fully supported. Below is a list of known issues to date. - -## Property Editors - -### Tags - -Whilst we have support for persisting the tag's value, we don't currently have the ability to write these tags to the `cmsTags` DB table. This is all handled via a `tagsRepository` which is internal so we currently can't save to it as core does. - -### Multi-Node Tree Picker - -When using a Multi-Node Tree Picker with an XPath filter, only filters starting with the `$root` placeholder will be valid. This is because all other placeholders expect the property editor to be placed on a content node, with that node being used as context. - -### RTE Macros - -Macros in Rich Text Editors don't appear to work properly due to the preview mechanism. They save and run on the front end, but you'll get an error notification in the backoffice as it tries to render a preview. diff --git a/10/umbraco-ui-builder/miscellaneous/conventions.md b/10/umbraco-ui-builder/miscellaneous/conventions.md deleted file mode 100644 index 3715219a956..00000000000 --- a/10/umbraco-ui-builder/miscellaneous/conventions.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -description: Conventions used by Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Conventions - -## Fluent Conventions - -Most configuration methods in Umbraco UI Builder aim to be fluent. This means that they return a relevant config instance allowing to chain multiple methods calls together in one. For those who prefer to be a bit more verbose, many methods also accept an optional lambda expression. This allows you to pass in a delegate to perform the inner configuration of the element being defined. - -```csharp -// Chaining example -config.AddSection("Repositories").Tree().AddCollection(p => p.Id, "Person", "People"); - -// Delegate example -config.AddSection("Repositories", sectionConfig => { - sectionConfig.Tree(treeConfig => { - treeConfig.AddCollection(p => p.Id, "Person", "People"); - }); -}); -``` - -## Naming Conventions - -Throughout the API, where a method name starts with **Add** then multiple configurations can be declared. Whereas if a method name starts with **Set** then only one instance of the configuration can be declared within the current configuration context. diff --git a/10/umbraco-ui-builder/miscellaneous/umbraco-aliases.md b/10/umbraco-ui-builder/miscellaneous/umbraco-aliases.md deleted file mode 100644 index a8a49526190..00000000000 --- a/10/umbraco-ui-builder/miscellaneous/umbraco-aliases.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -description: A list of useful Umbraco aliases for use with Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Umbraco Aliases - -In a number of places in the Umbraco UI Builder API, you are required to know the aliases of other elements. For example, when you are adding sections, context apps, or dashboards before/after other instances. This is basic enough when it's referencing aliases of things defined in the Umbraco UI Builder config. However, for existing Umbraco instances it can be hard to find them so below is documented a number of known aliases for different elements. - -## Dashboard aliases - -### **Content** - -| Name | Alias | -| -- | -- | -| Getting Started | `contentIntro` | -| Redirect URL Management | `contentRedirectManager` | - -### **Media** - -| Name | Alias | -| -- | -- | -| Content | `mediaFolderBrowser` | - -### **Settings** - -| Name | Alias | -| -- | -- | -| Welcome | `settingsWelcome` | -| Examine Management | `settingsExamine` | -| Published Status | `settingsPublishedStatus` | -| Models Builder | `settingsModelsBuilder` | -| Health Check | `settingsHealthCheck` | - -### **Members** - -| Name | Alias | -| -- | -- | -| Getting Started | `memberIntro` | - -## Content App aliases - -### **Content** - -| Name | Alias | -| -- | -- | -| Content | `umbContent` | -| Info | `umbInfo` | - -### **Media** - -| Name | Alias | -| -- | -- | -| Content | `umbContent` | -| Info | `umbInfo` | - -### **Members** - -| Name | Alias | -| -- | -- | -| Content | `umbContent` | -| Info | `umbInfo` | - -### **ContentTypes** - -| Name | Alias | -| -- | -- | -| Design | `design` | -| List View | `listView` | -| Permissions | `permissions` | -| Templates | `templates` | - -## Section aliases - -| Name | Alias | -| -- | -- | -| Content | `content` | -| Media | `media` | -| Settings | `settings` | -| Packages | `packages` | -| Users | `users` | -| Members | `member` | -| Forms | `forms` | -| Translation | `translation` | - -## Tree aliases - -| Name | Alias | -| -- | -- | -| Content | `content` | -| Media | `media` | -| Members | `member` | -| Member Groups | `memberGroups` | diff --git a/10/umbraco-ui-builder/property-editors/entity-picker.md b/10/umbraco-ui-builder/property-editors/entity-picker.md deleted file mode 100644 index 16e23ab2f5f..00000000000 --- a/10/umbraco-ui-builder/property-editors/entity-picker.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -description: Using the entity picker property editor with Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Entity Picker - -The Entity Picker property editor is an Umbraco property editor that lets you select one or more entities from an Umbraco UI Builder collection. - -## Configuring an entity picker - -To configure an entity picker you need to create a Data Type in the Umbraco backoffice. From the property editor dropdown choose 'Umbraco UI Builder Entity Picker'. - -![Data Type config](../images/entity_picker_config.png) - -From there choose 'Section' and 'Collection' you wish to pick entities from. You can also choose an optional list view 'Data View' if there are any configured. - -You can also set a minimum and maximum number of items to be able to pick if required. - -With an entity picker Data Type defined, finish off the configuration by adding it to the desired Document Type definition. - -![Document Type config](../images/entity_picker_setup.png) - -## Using an entity picker - -Using the entity picker should be pretty familiar as it aims to mimic the content picker as closely as possible. - -To pick an entity click the 'Add' link to launch the picker dialog. The dialog should present a paginated list of entities to pick from. If any searchable fields were configured for the entity type, you can perform a search by typing a search term in the search input field. - -![Entity picker dialog](../images/entity_picker_search.png) - -To pick your items click on the entity names and then click 'Select' in the bottom right-hand corner. - -The picker should display a summary of the selected entities which can be sorted by dragging the selected entities into the desired order. - -![Entity picker values](../images/entity_picker_picked.png) - -To save the value either **save** or **save and publish** the current document. - -## Getting the value of an entity picker - -The entity picker property editor comes with a built-in [value converter](https://docs.umbraco.com/umbraco-cms/extending/property-editors/property-value-converters/). This means that whenever you retrieve the property value from Umbraco it will return the actual selected entities, even converting them to the relevant type. - -````csharp -// Example -foreach(var p in Model.People){ - ... -} -```` diff --git a/10/umbraco-ui-builder/property-editors/overview.md b/10/umbraco-ui-builder/property-editors/overview.md deleted file mode 100644 index 59f17f6be6b..00000000000 --- a/10/umbraco-ui-builder/property-editors/overview.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -description: Property Editors available with Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Property Editors - -As well as the API for managing your custom data source, Umbraco UI Builder also comes with some property editors. Those property editors help you work with your data inside Umbraco content nodes. - -The property editors available are: - -{% content-ref url="entity-picker.md" %} -[Entity Picker](entity-picker.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/release-notes.md b/10/umbraco-ui-builder/release-notes.md deleted file mode 100644 index 5297e13740c..00000000000 --- a/10/umbraco-ui-builder/release-notes.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -description: >- - Get an overview of the things changed and fixed in each version of Umbraco UI Builder. ---- - -# Release Notes - -In this section, we have summarized the changes to Umbraco UI Builder released in each version. Each version is presented with a link to the [UI Builder issue tracker](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues) showing a list of issues resolved in the release. We also link to the individual issues themselves from the detail. - -If there are any breaking changes or other issues to be aware of when upgrading they are also noted here. - -{% hint style="info" %} -If you are upgrading to a new major version, check the breaking changes in the [Version Specific Upgrade Notes](./upgrading/version-specific.md) article. -{% endhint %} - -## Release History - -This section contains the release notes for Umbraco UI Builder 10 including all changes for this version. - -#### [**10.0.5**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.5) **(February 13th 2025)** - -* Added previously validated license resolver, to validate a license if a validation process was already executed successfully in the past 7 days. - -#### [**10.0.4**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.4) **(March 18th 2024)** - -* Fixed an issue where the database is getting disposed in a UIBuilder repository, causing an error when Forms tries to save the form submission after the workflow is complete [Umbraco.Forms.Issues#1179](https://github.com/umbraco/Umbraco.Forms.Issues/issues/1179). - -#### [**10.0.3**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.3) **(February 20th 2024)** - -* Dependency version update for `Umbraco.Licenses` -* Version range update for `Microsoft.AspNetCore.Components.Web` [#89](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/89) - -#### [**10.0.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.2) **(December 1st 2023)** - -* Run server side validation on action settings dialog [#34](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/34). -* Saving a node does't close the editor [#57](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/57). -* Entity Picker used in Konstrukt editor has validation issues [#61](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/61). -* Angular error when adding a custom action in the ContainerMenu [#73](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/73). -* Not populating $scope.model.dataTypeKey, problems using Contentment Data Picker [#76](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/76). - -#### [**10.0.1**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F10.0.1) **(November 1st 2023)** - -* Null check text based filter clauses [#66](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/66). -* Allow setting an editor fields Data Type by Guid key [#67](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/67). -* Updated child entity creation routine to cast the parent id to the childs FK type, allowing conversion via Type Converters [#68](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/68). -* Updated entity service `FetchEntitiesByIds` to maintain the order of results based on the order of the IDs passed in [#70](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/70). - -#### [**10.0.0**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues) **(October 25th 2023)** - -* Initial product launch. - -## Legacy release notes - -You can find the release notes for **Konstrukt** in the [Change log file on GitHub](changelog-archive/changelog.md). diff --git a/10/umbraco-ui-builder/searching/overview.md b/10/umbraco-ui-builder/searching/overview.md deleted file mode 100644 index 3d91fcb6f60..00000000000 --- a/10/umbraco-ui-builder/searching/overview.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -description: Configuring searching in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Searching - -Beyond listing collection entities, if you need to be able to locate specific entities within a collection then Umbraco UI Builder provides a search API. - -![Search](../images/search.png) - -Get started by reviewing how to define searchable properties. - -{% content-ref url="searchable-properties.md" %} -[searchable-properties.md](searchable-properties.md) -{% endcontent-ref %} diff --git a/10/umbraco-ui-builder/searching/searchable-properties.md b/10/umbraco-ui-builder/searching/searchable-properties.md deleted file mode 100644 index 8c62eeb7efe..00000000000 --- a/10/umbraco-ui-builder/searching/searchable-properties.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -description: Configuring searchable properties in Umbraco UI Builder, the backoffice UI builder for Umbraco. ---- - -# Searchable Properties - -Searchable properties allow you to define any `String` based properties on a model. They will be searchable via Umbraco UI Builder's list view and entity picker search controls. - -![Search](../images/search.png) - -## Defining searchable properties - -### **AddSearchableProperty(Lambda searchablePropertyExpression) : CollectionConfigBuilder<TEntityType>** - -Adds the given property to the searchable properties collection. - -````csharp -// Example -collectionConfig.AddSearchableProperty(p => p.FirstName); -```` diff --git a/10/umbraco-ui-builder/upgrading/migrating-from-konstrukt-to-umbraco-ui-builder.md b/10/umbraco-ui-builder/upgrading/migrating-from-konstrukt-to-umbraco-ui-builder.md deleted file mode 100644 index 852ead935e2..00000000000 --- a/10/umbraco-ui-builder/upgrading/migrating-from-konstrukt-to-umbraco-ui-builder.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -description: Learn how to migrate a Konstrukt solution to Umbraco UI Builder. ---- - -# Migrate from Konstrukt to Umbraco UI Builder - -This guide provides a step-by-step approach to migrating a default Konstrukt solution to Umbraco UI Builder. - -## Key changes - -Before outlining the exact steps, there are a few key changes to be aware of. - -These changes will dictate the steps to take in the process of migrating to Umbraco UI Builder. - -### Project, Package, and Namespace changes - -| Konstrukt | Umbraco UI Builder | -| ------------------------------- | --------------------------------------- | -| Konstrukt.Core | Umbraco.UIBuilder.Core | -| Konstrukt.Infrastructure | Umbraco.UIBuilder.Infrastructure | -| Konstrukt.Web | Umbraco.UIBuilder.Web | -| Konstrukt.Web.UI | Umbraco.UIBuilder.Web.StaticAssets | -| Konstrukt.Startup | Umbraco.UIBuilder.Startup | -| Konstrukt | Umbraco.UIBuilder | - -
- -C# Class changes - -* Namespace changes as documented above. -* Most classes prefixed with the `Konstrukt` keyword have had this prefix removed. - * Examples: `IKonstruktRepository` is now `IRepository` - * Exclusions: The root level `KonstruktConfig` and `KonstruktConfigBuilder` have a `UIBuilder` prefix instead, and the `AddKonstrukt` extension for `IUmbracoBuilder` has been replaced by `AddUIBuilder` - -
- -
- -JavaScript changes - -* All `Konstrukt` controllers have changed namespace to `Umbraco.UIBuilder`. -* All `Konstrukt` prefixed directives, services, and resources are now prefixed with `uibuilder`. - -
- -
- -UI Changes - -* All static UI assets are served via a Razor Compiled Library (RCL) and are no longer found in the `App_Plugins` folder. -* The folder with `App_Plugins` has been renamed from `Konstrukt` to `UmbracoUIBuilder`. - -
- -## Step 1: Replace dependencies - -In this first step, we will be replacing all existing Konstrukt dependencies with Umbraco UI Builder dependencies. - -1. Remove any installed Konstrukt packages: - -```bash -dotnet remove package Konstrukt -``` - -2. Delete the Konstrukt `App_Plugins` folder: - -```bash -rmdir App_Plugins\Konstrukt -``` - -3. Install `Umbraco.UIBuilder`: - -```bash -dotnet add package Umbraco.UIBuilder -``` - -4. Compile your project against .NET 7.0. - -## Step 2: Update namespaces and entity names - -Based on the [Key Changes](./#key-changes) outlined above update all Konstrukt references to the new Umbraco UI Builder alternatives. Ensure you update any Views/Partials that also reference these. - -## Step 3: Update your configuration - -If all your configuration is in a single statement, it would be a case of swapping `AddKonstrukt` to `AddUIBuilder`. If you broke your configuration into multiple steps, or are using `Action` or `Card` classes, you will need to update the config builder/base classes. Those classes need to be updated to their UI Builder alternative names as detailed in [Key Changes](./#key-changes). - - -```csharp -public class Startup -{ - ... - public void ConfigureServices(IServiceCollection services) - { - services.AddUmbraco(_env, _config) - .AddBackOffice() - .AddWebsite() - .AddUIBuilder(cfg => { - // The rest of your configuration - }) - .AddComposers() - .Build(); - } - ... -} - -``` - -## Step 4: Finalizing the migration - -1. Delete any obj/bin folders in your projects to ensure a clean build. -2. Recompile all projects and ensure all dependencies are restored correctly -3. Delete the existing Konstrukt license files in the `umbraco\Licenses` folder. -4. Add your new Umbraco.UIBuilder license key to the `appSettings.json` file: - -```json -"Umbraco": { - "Licenses": { - "Umbraco.UIBuilder": "YOUR_LICENSE_KEY" - } -} -``` - -5. Run the project. \ No newline at end of file diff --git a/10/umbraco-ui-builder/upgrading/upgrade.md b/10/umbraco-ui-builder/upgrading/upgrade.md deleted file mode 100644 index 711a4715aed..00000000000 --- a/10/umbraco-ui-builder/upgrading/upgrade.md +++ /dev/null @@ -1,46 +0,0 @@ -# Upgrading Umbraco UI Builder - -This article shows how to manually upgrade Umbraco UI Builder to run the latest version. -When upgrading Umbraco UI Builder, be sure to also consult the [version specific upgrade](version-specific.md) notes to learn about potential breaking changes and common pitfalls. - -{% hint style="warning" %} -Before upgrading, it is always advisable to take a complete backup of your site and database. -{% endhint %} - -## Get the latest version of Umbraco UI Builder - -To upgrade to the latest version of Umbraco UI Builder you can use: - -- NuGet -- Visual Studio - -### NuGet - -- NuGet installs the latest version of the package when you use the `dotnet add package Umbraco.UIBuilder` command unless you specify a package version: `dotnet add package Umbraco.UIBuilder --version ` - -- After you have added a package reference to your project by executing the `dotnet add package Umbraco.UIBuilder` command in the directory that contains your project file, run `dotnet restore` to install the package. - - -### Visual Studio - -1. Go to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution...` in Visual Studio, to upgrade Umbraco UI Builder: -2. Select **Umbraco.UIBuilder**. -3. Select the latest version from the Version drop-down and click Install. -4. When the command completes, open the **.csproj** file to make sure the package reference is updated: - -```xml - - - -``` - -If you are using one or more of the below sub-packages, they also need to be upgraded as well: - -| Sub-package | Description | -| -- | -- | -| Umbraco.UIBuilder.Core | Core UI Builder functionality that doesn't require any infrastructure-specific dependencies | -| Umbraco.UIBuilder.Infrastructure | Infrastructure-specific project containing implementations of core UI Builder functionality | -| Umbraco.UIBuilder.Web | The core UI Builder logic that requires a web context | -| Umbraco.UIBuilder.Web.StaticAssets | The static assets for the UI Builder presentation layer | -| Umbraco.UIBuilder.Startup | The main logic for registering UI Builder with Umbraco | -| Umbraco.UIBuilder | The main UI Builder package | \ No newline at end of file diff --git a/10/umbraco-ui-builder/upgrading/version-specific.md b/10/umbraco-ui-builder/upgrading/version-specific.md deleted file mode 100644 index 10bbacb0e34..00000000000 --- a/10/umbraco-ui-builder/upgrading/version-specific.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -description: >- - Version specific documentation for upgrading to new major versions of Umbraco - UI Builder. ---- - -# Version Specific Upgrade Notes - -This page covers specific upgrade documentation for when migrating to major 10 of Umbraco UI Builder. - -{% hint style="info" %} -If you are upgrading to a new minor or patch version, you can find information about the breaking changes in the [Release Notes](../release-notes.md) article. -{% endhint %} - -## Version Specific Upgrade Notes History - -Version 10 is the initial Long-term support (LTS) release of the Umbraco UI Builder product. It contains a number of breaking changes from the previous, Konstrukt product. - -See the [Migrate from Konstrukt to Umbraco UI Builder guide](../upgrading/migrating-from-konstrukt-to-umbraco-ui-builder.md) for full details. - -## Legacy version specific upgrade notes - -You can find the version specific upgrade notes for versions out of support in the [Legacy documentation on GitHub](https://github.com/umbraco/UmbracoDocs/tree/umbraco-eol-versions).