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 you to encapsulate complexity and helps reduce duplication.

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

Appearance

Design Rendered
Subform component rendered
Subform component design

Attributes

Group Name Description

General

ID

This is a unique id for the component.

Label

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

Label tooltip

When it is defined, a question mark icon appears in the component label. When the user hovers over it, it shows this text in a tooltip.

Store subform data in single variable

The binding for the component. Use an appropriate expression to bind the component to its value and 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, for example, '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 example, '{{root.foo}}' stores the value in the root case using a variable named 'foo'. Please refer to the section 'Form expressions' in the Flowable guide for more information.

Ignored

If true the component is hidden and the value is not part of the payload.

Visible

A Boolean value or expression specifying 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 or hide the component according to the checked state of the checkbox. If you want only to 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 a start form.

Enabled

Specifies whether the component is enabled or disabled.

Details

Form reference

The referenced form 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 used at runtime.

Show border

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

Multiple elements

If multiple elements are set to 'true', the subform can hold more than one entry and the variable the subform is bound to 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 hold a map rather than a list of maps.

Minimum elements

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

Maximum elements

If provided, it limits the addition of elements to the specified value. Either provide a fixed number of an expression to specify the maximum number of elements in the subform or leave it blank, if there is no limitation.

Show add button

When multiple entries is true, it shows or hides the add button.

Show remove button

When multiple entries is true, it shows or hides the delete button.

Add button text

The text of the button which adds new elements.

Collapsible

If true, the subform is collapsed or expanded by clicking on an arrow.

Collapsed

If true, the subform is collapsed.

Error messages

Minimum elements

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

Maximum elements

Specifies the message to be displayed if the maximum number of elements in the subform is not reached.

Documentation

Documentation

Documentation intended to explain concepts of its use for future reference.

Customization

Style class

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