Subform component icon Subform

Subforms allow for the creation of a form within a form. That way, form definitions can be re-used which allows to encapsulate complexity and helps reducing duplicatation.

By activating the "Multiple elements" option, subforms can be used to store complex lists.

Appearance

Design Rendered
Subform component rendered
Subform component design

Attributes

Group Name Description

General

Label

The label attribute adds a label to the component, if not empty.

Label position

The position of the label, you can choose between left or top.

Store subform data in single variable

The binding for the component. Use an appropriate expression to bind the component to its value and thus specify where the value is saved read. For example, use {{myVariableName}} to store the value of the component in a variable named myVariableName. Use prefixes to define the scope of the value, e.g. 'root.' for referencing the root case to store the value in or 'parent.' to store the value in the parent work item of the current one. For instance '{{root.foo}}' will store the value in the root case using a variable named 'foo'. Please refer to the section 'Frontend expressions' in the edoras one modeler guide for more information.

Default value

If Value is not set (usually on Init Forms), the Default Value will be used. Use an appropriate value; e.g. a text, a number, an id or a comma separated list thereof.

Description

The description attribute additionally adds a description to the component.

Visible

Boolean value or expression specifies whether the component is visible or hidden. This expression might include another value in the same form, for instance use a checkbox bound to {{showAdditionalFields}} and use the very same expression as the visible (RT) attribute to show / hide the component according the checked state of the checkbox. If you want to only show the component, if the form is not used as the init-form, you can use the expression {{root.id}} which evaluates to true only, if there is a current case id which is not the case in an init form.

Ignored

If true the component will be hidden and the value won’t be part of the payload.

Enabled

Specifies whether the component is enabled or disabled.

Style class

Stylesheet class name. Add any style classes to be applied to the component for the desired styling and rendering.

Documentation

Intended for documenting details about specific widget to explain concepts of its use for future reference.

Details

Form reference

The referenced form to be used as a subform. You can either select a form reference directly (static) or even use an expression in order to dynamically specify the subform to be used during runtime.

Show border

If true, the sub form renders a border around the list of elements in it.

Multiple elements

If multiple elements is set to 'true', the subform can hold more than one entry and the variable the subform is bound to will contain a list of maps holding the data shown in the subforms. Set multiple elements to 'false', if there should only be one subform shown and the variable the subform is bound to will hold a map rather than a list of maps.

Minimum elements

If provided, a minimum number of elements in the sub form must be added. Either provide a fixed number of an expression to specify the minimum number of elements in the sub form or leave it blank, if there is no limitation.

Maximum elements

If provided, it won’t be possible to add more elements than the specified ones. Either provide a fixed number of an expression to specify the maximum number of elements in the sub form or leave it blank, if there is no limitation.

Show add/remove

If the subform can hold multiple elements, this attribute specifies whether the add / remove buttons should be shown and thus allowing the user to create new elements or to remove existing elements. This can also be done using a dynamic expression.

Collapsible

If true, the subform can be collapsed/expanded by clicking on an arrow ▲/▼.

Add button text

The text of the button which adds new elements.

Collapsed

If true, the subform will be collapsed.

Remove HTML when collapsed

If true, the subform HTML will be removed when it is collapsed.

Error Messages

Minimum elements

Specifies the message to be displayed if the minimum number of elements in the sub form is not reached.

Maximum elements

Specifies the message to be displayed if the maximum number of elements in the sub form is exceeded.