From 26f504393c9b836fd60f273660864a3794f59484 Mon Sep 17 00:00:00 2001 From: Niklas Kiefer Date: Tue, 18 Jul 2023 08:58:39 +0200 Subject: [PATCH] Update forms library (part 2) (#2174) * docs(forms): add more feel properties docs Related to https://github.com/camunda/team-hto/issues/247 * docs(forms): add feel support for multiselect options * docs(forms): update phrase for example JSON --------- Co-authored-by: christinaausley <84338309+christinaausley@users.noreply.github.com> --- .../modeler/forms/configuration/forms-config-options.md | 4 ++++ .../form-element-library/forms-element-library-image.md | 4 ++-- .../form-element-library/forms-element-library-number.md | 8 ++++---- .../forms-element-library-textfield.md | 8 ++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/components/modeler/forms/configuration/forms-config-options.md b/docs/components/modeler/forms/configuration/forms-config-options.md index d98878487f..2f7cdee73a 100644 --- a/docs/components/modeler/forms/configuration/forms-config-options.md +++ b/docs/components/modeler/forms/configuration/forms-config-options.md @@ -43,6 +43,10 @@ The expected format for the data is an array of options, each defining its label } ``` +### FEEL expressions + +The options are populated from a [FEEL expression](../../feel/language-guide/feel-expressions-introduction.md) that returns an array of options. The resulting array must be formatted as described in the [example JSON above](#input-data-driven-by-process-data). + #### Shorthand definitions If the value and label are equal, shorthand formats may be used instead: diff --git a/docs/components/modeler/forms/form-element-library/forms-element-library-image.md b/docs/components/modeler/forms/form-element-library/forms-element-library-image.md index fdc53f770c..ab12d0a9b4 100644 --- a/docs/components/modeler/forms/form-element-library/forms-element-library-image.md +++ b/docs/components/modeler/forms/form-element-library/forms-element-library-image.md @@ -10,7 +10,7 @@ An element allowing the user to display images. ## Configurable properties -- **Image source**: Specifies the image source via [expression](../../feel/language-guide/feel-expressions-introduction.md) or static value (hyperlink or data URI). -- **Alternative text**: Provides an alternative text to the image in case it cannot be displayed. +- **Image source**: Specifies the image source via [expression](../../feel/language-guide/feel-expressions-introduction.md), [templating syntax](../configuration/forms-config-templating-syntax.md) or static value (hyperlink or data URI). +- **Alternative text**: Provides an alternative text to the image in case it cannot be displayed. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md), plain text, or [templating syntax](../configuration/forms-config-templating-syntax.md). - **Hide if**: [Expression](../../feel/language-guide/feel-expressions-introduction.md) to hide the image. - **Columns**: Space the field will use inside its row. **Auto** means it will automatically adjust to available space in the row. Read more about the underlying grid layout in the [Carbon Grid documentation](https://carbondesignsystem.com/guidelines/2x-grid/overview). diff --git a/docs/components/modeler/forms/form-element-library/forms-element-library-number.md b/docs/components/modeler/forms/form-element-library/forms-element-library-number.md index 0926c089f4..3741a9d756 100644 --- a/docs/components/modeler/forms/form-element-library/forms-element-library-number.md +++ b/docs/components/modeler/forms/form-element-library/forms-element-library-number.md @@ -23,11 +23,11 @@ A number field allowing the user to read and edit numeric data. - **Serialize to string**: Configures the output format of the datetime value. This enables unlimited precision digits. - **Validation**: Given that one of the following properties is set, the form will only submit when the respective condition is fulfilled. Otherwise, a validation error will be displayed. - **Required**: Number field must contain a value. - - **Minimum**: Number field value must be at least `n`. - - **Maximum**: Number field value must be no larger than `n`. + - **Minimum**: Number field value must be at least `n`. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md) or a number. + - **Maximum**: Number field value must be no larger than `n`. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md) or a number. - **Appearance**: Changes the visual appearance of the number field. - - **Prefix**: Adds an appendage before the input. - - **Suffix**: Adds an appendage after the input. + - **Prefix**: Adds an appendage before the input. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md), plain text, or [templating syntax](../configuration/forms-config-templating-syntax.md). + - **Suffix**: Adds an appendage after the input. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md), plain text, or [templating syntax](../configuration/forms-config-templating-syntax.md). ### Datatypes diff --git a/docs/components/modeler/forms/form-element-library/forms-element-library-textfield.md b/docs/components/modeler/forms/form-element-library/forms-element-library-textfield.md index 0cf610120e..366219d3bc 100644 --- a/docs/components/modeler/forms/form-element-library/forms-element-library-textfield.md +++ b/docs/components/modeler/forms/form-element-library/forms-element-library-textfield.md @@ -21,12 +21,12 @@ A text field allowing the user to read and edit textual data. - **Validation**: Given that one of the following properties is set, the form will only submit when the respective condition is fulfilled. Otherwise, a validation error will be displayed. - **Required**: Text field must contain a value. - **Regular expression validation**: Use predefined validation patterns. Available options are: `Email`, `Phone`, and `Custom`. - - **Minimum length**: Text field must have at least `n` characters. - - **Maximum length**: Text field must not have more than `n` characters. + - **Minimum length**: Text field must have at least `n` characters. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md) or a number. + - **Maximum length**: Text field must not have more than `n` characters. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md) or a number. - **Regular expression pattern**: Text field value must match the provided [RegEx](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet) pattern. - **Appearance**: Changes the visual appearance of the text field. - - **Prefix**: Adds an appendage before the input. - - **Suffix**: Adds an appendage after the input. + - **Prefix**: Adds an appendage before the input. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md), plain text, or [templating syntax](../configuration/forms-config-templating-syntax.md). + - **Suffix**: Adds an appendage after the input. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md), plain text, or [templating syntax](../configuration/forms-config-templating-syntax.md). ### Datatypes