Skip to content

Commit

Permalink
Update forms library (part 2) (#2174)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Niklas Kiefer and christinaausley authored Jul 18, 2023
1 parent 4ddb665 commit 26f5043
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 26f5043

Please sign in to comment.