Skip to content

Commit

Permalink
Forms/extending settings (#6755)
Browse files Browse the repository at this point in the history
* Clarified documentation on creating a custom setting type

* Updated version reference

* Fixes
  • Loading branch information
AndyButland authored Dec 18, 2024
1 parent ca3e21a commit e59418c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
16 changes: 7 additions & 9 deletions 14/umbraco-forms/developer/extending/setting-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,18 @@ Some are defined with the Umbraco CMS and some ship with the Forms package.
| Forms.PropertyEditorUi.StandardFieldMapper | Forms | Used to map system fields from a form to required aliases | The "Send to URL" workflow |
| Forms.PropertyEditorUi.TextWithFieldPicker | Forms | Uses a single-line textbox/form field list for entry | Not used in core types |

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

The one exception is `Forms.PropertyEditorUi.TextWithFieldPicker`. This one we don't use within the package, but we make it available for developers to use when creating their own types.
## Additional setting types

It offers the option of text field entry or the selection of a field from the form. This can be useful in workflows where you need to reference the value of a specific field.
Some types we don't use within the package, but we make available for developers to use when creating their own types.

For example `Forms.PropertyEditorUi.TextWithFieldPicker`. This offers the option of text field entry or the selection of a field from the form. This can be useful in workflows where you need to reference the value of a specific field.

![Text with field picker](./images/text-with-field-picker.png)

## Creating a setting type

To create a custom setting type you will need an AngularJS view and controller in the following location: `/App_Plugins/MyPlugin/`.

{% hint style="info" %}
Your plugin folder path must be outside of the `/App_Plugins/UmbracoForms/` folder if you use a custom Angular controller and Package.manifest.
{% endhint %}
It's also possible to define your own setting type using a combination of server and client-side code.

You then add the name of the view as the `View` property on the `Setting` attribute defined on the type.
Read how do this in the article on [adding a custom field type](./adding-a-fieldtype.md#field-settings).
2 changes: 1 addition & 1 deletion 15/umbraco-forms/developer/extending/adding-a-fieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ All setting properties for the Forms provider types are marked as `virtual`, so

## Umbraco Backoffice Components

With Forms 14, aspects of the presentation and functionality of the custom field are handled by client-side components, registered via manifests:
With Forms 14+, aspects of the presentation and functionality of the custom field are handled by client-side components, registered via manifests:

* The preview, displayed on the form definition editor.
* The property editor UI used for editing the the submitted values via the backoffice.
Expand Down
16 changes: 7 additions & 9 deletions 15/umbraco-forms/developer/extending/setting-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,18 @@ Some are defined with the Umbraco CMS and some ship with the Forms package.
| Forms.PropertyEditorUi.StandardFieldMapper | Forms | Used to map system fields from a form to required aliases | The "Send to URL" workflow |
| Forms.PropertyEditorUi.TextWithFieldPicker | Forms | Uses a single-line textbox/form field list for entry | Not used in core types |

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

The one exception is `Forms.PropertyEditorUi.TextWithFieldPicker`. This one we don't use within the package, but we make it available for developers to use when creating their own types.
## Additional setting types

It offers the option of text field entry or the selection of a field from the form. This can be useful in workflows where you need to reference the value of a specific field.
Some types we don't use within the package, but we make available for developers to use when creating their own types.

For example `Forms.PropertyEditorUi.TextWithFieldPicker`. This offers the option of text field entry or the selection of a field from the form. This can be useful in workflows where you need to reference the value of a specific field.

![Text with field picker](./images/text-with-field-picker.png)

## Creating a setting type

To create a custom setting type you will need an AngularJS view and controller in the following location: `/App_Plugins/MyPlugin/`.

{% hint style="info" %}
Your plugin folder path must be outside of the `/App_Plugins/UmbracoForms/` folder if you use a custom Angular controller and Package.manifest.
{% endhint %}
It's also possible to define your own setting type using a combination of server and client-side code.

You then add the name of the view as the `View` property on the `Setting` attribute defined on the type.
Read how do this in the article on [adding a field type](./adding-a-fieldtype.md#field-settings).

0 comments on commit e59418c

Please sign in to comment.