# Repeatable section - RepeatableSection

A set of fields that can be filled multiple times in the form by the user.

![](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/hzYmMQfUhU0Ho5gnZCnD/21s_files/image2025-5-16_11-47-17.png)

## Component properties

<table><thead><tr><th>Eximee Designer property</th><th width="187.583251953125">Attribute name in the Source</th><th>Description</th></tr></thead><tbody><tr><td><strong>Minimum number of section occurrences</strong><br>(section <strong>Basic properties</strong>)</td><td>minCount</td><td>The minimum number of occurrences of a repeatable section (initial value 1). When the form is displayed, this is also the number of occurrences that are visible and available by default. When removing section items while filling out the form, you cannot go below this number.</td></tr><tr><td><strong>Maximum number of section occurrences</strong><br>(section <strong>Basic properties</strong>)</td><td>maxCount</td><td>The maximum number of occurrences of a repeatable section (initial value 1). When adding section items you cannot exceed this number.</td></tr><tr><td><strong>Title</strong><br>(section <strong>Basic properties</strong>)</td><td>title</td><td><p>Title. </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Title of the entire repeatable section</strong><br>(section <strong>Basic properties</strong>)</td><td>parentSectionTitle</td><td>Title for the entire repeatable section.</td></tr><tr><td><strong>Label for the collapse section button</strong><br>(section <strong>Other</strong>)</td><td></td><td><p>Label for the collapse section button. </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Label for the expand section button</strong><br>(section <strong>Other</strong>)</td><td></td><td><p>Label for the expand section button. </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Foldable section</strong><br>(section <strong>Other</strong>)</td><td>foldable</td><td><p>Determines whether the section should be foldable (initially set to "false"). </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Section folding condition</strong><br>(section <strong>Other</strong>)</td><td>foldedCondition</td><td><p>Condition for folding the section. </p><p>The availability of the functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Presentation mode for expanding sections</strong><br>(section <strong>Other</strong>)</td><td>presentation</td><td><p>Specifies the presentation mode for expanding sections. Available fold/unfold presentation types: STANDARD and LABELS (see more detailed description below). </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Dynamic button labels</strong><br>(section <strong>Other</strong>)</td><td>plusMinusLabels</td><td>Conditions for the visibility of the add/remove buttons for repeatable section items.</td></tr><tr><td><strong>Label for the remove section button</strong><br>(section <strong>Other</strong>)</td><td>minusText</td><td>Label for the minus button (removal of a repeatable section item).</td></tr><tr><td><strong>Label for the add section button</strong><br>(section <strong>Other</strong>)</td><td>plusText</td><td>Label for the plus button (addition of a repeatable section item).</td></tr><tr><td><strong>Title of the expanded section</strong><br>(section <strong>Other</strong>)</td><td>rowTitleExpanded</td><td><p>Title displayed for the expanded section. </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Title of the collapsed section</strong><br>(section <strong>Other</strong>)</td><td>rowTitleCollapsed</td><td><p>Title displayed for the collapsed section. </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Component border</strong><br>(section <strong>Other</strong>)</td><td>parentSectionFrameVisible</td><td><p>Setting the flag causes a frame to be displayed around all occurrences of the repeatable section (initially set to "false"). </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Offset value for the add button</strong><br>(section <strong>Other</strong>)</td><td>plusButtonOffset</td><td><p>Offset value for the add button (initially set to 0). </p><p>The availability of functionality depends on the license and may not be available in all deployments.</p></td></tr><tr><td><strong>Tooltip for the remove button</strong><br>(section <strong>Other</strong>)</td><td>minusToolTipText</td><td>Tooltip for the row remove button</td></tr></tbody></table>

> More information about component properties: [Common component properties](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/praca-z-komponentami-bazowymi/wspolne-wlasciwosci-komponentow)

## Working with a repeatable section

Placing a repeatable section on the form template adds an area that can be worked with similarly to the entire form. This means that this area has its own page layout and can contain any number of base components. In the example in the figure, an occurrence of the repeatable section was configured as a composite consisting of a text field and choice fields from a list with labels. The plus/minus sign in the bottom right corner is used to add additional rows to the section.

In the resulting form, occurrences of the repeatable section are displayed according to the configuration. The user can remove or add occurrences using the **minus** and **plus**.

![Illustration 1. Example appearance of the component on the application](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/YBk7oFeuv7ywFUWuBLPp/21s_files/image2025-5-16_11-47-57.png)

<p align="center"></p>

{% hint style="warning" %}
In a Repeatable Section you cannot use [session variables](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/zmienne-sesyjne) — here we use technical fields (e.g. Text Field component with the property [Technical field](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/praca-z-komponentami-bazowymi/wspolne-wlasciwosci-komponentow)). Also, populating fields from a service in a repeatable section may cause unusual errors — e.g. incorrect rendering of components (but not necessarily). In such a situation a workaround using a technical field should be applied.
{% endhint %}

## Populating a repeatable section with a service&#x20;

It is recommended that when creating a ServiceProxy you inherit from the class **AbstractRepeatableServiceProxy**. This class automatically returns 3 values: minCount, maxCount and count. These values can be set or left alone — they are optional.

Example ServiceProxy:

* It has 2 input fields added,
* It has 2 additional output fields added (**minCount**, **maxCount**, **count** are added in the parent class),
* To set the parameters you only need to call the appropriate setters on the model **RepeatableSectionMetadata** and call the appropriate setters,
* After setting the above parameters, we set the values that we will then map to the individual fields.

{% code title="RepeatableTestSp.java" expandable="true" %}

```java
@Component
@Service(AbstractServiceProxy.class)
public class RepeatableTestSp extends AbstractRepeatableServiceProxy {

    public RepeatableTestSp(String name, String description) {
        super("RepeatableTestSp", "Description...");
        this.inputFields.add(new ServiceProxyField("input1"));
        this.inputFields.add(new ServiceProxyField("input2"));
        this.outputFields.add(new ServiceProxyField("output1"));
        this.outputFields.add(new ServiceProxyField("output2"));
    }

    @Override
    protected RepeatableSectionMetadata callRepeatableSectionService(
            Map<String, List<String>> requestParams, String lang) throws ServiceProxyException {
        final RepeatableSectionMetadata repeatableSectionMetadata = new RepeatableSectionMetadata();
        repeatableSectionMetadata.setMinCount(1);
        repeatableSectionMetadata.setMaxCount(10);
        repeatableSectionMetadata.setCount(5);
        repeatableSectionMetadata.setRepeatableSectionRows(createRows());
        return repeatableSectionMetadata;
    }

    private List<Map<String, String>> createRows() {
        final List<Map<String, String>> rows = new ArrayList<>();
        rows.add(createRow());
        rows.add(createRow());
        return rows;
    }

    private Map<String, String> createRow() {
        final Map<String, String> map = new HashMap<>();
        map.put("output1", "1");
        map.put("output2", "abc");
        return map;
    }
}
```

{% endcode %}

To use the above ServiceProxy, in the **externalDataSource** the type should be **REPEATABLE\_SCECTION\_SERVICE**.

In summary: the service added 2 rows, but set the count value to 5. So 5 rows will be displayed, of which only 2 will be filled with the mapped value from the endpoint output1.

{% hint style="info" %}
It is also possible to populate a repeatable section with a script.
{% endhint %}

{% hint style="info" %}
Demo forms:

* demoRepeatableSection
* repeatable\_section\_service (a form showing populating the section with a service or script)
* demoRepeatableSectionValidator (a form with a validator for repeating values in the section)
  {% endhint %}

{% hint style="info" %}
&#x20;♿WCAG: [WCAG best practices for low-code dev](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/proces-biznesowy/tworzenie-procesu-biznesowego-w-bpmn-2.0/dobre-praktyki)
{% endhint %}
