> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/2-pola-wyboru/checkbox/grupa-checkbox-checkboxgroup.md). Agents can also search and read this documentation through its [MCP server](https://docs.eximee.com/~gitbook/mcp).

# Checkbox group - CheckboxGroup

{% hint style="info" %}
Availability of functionality depends on the license and may not be available in all deployments.
{% endhint %}

Checkbox group component powered by a dictionary or service.

![](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/xKlEda8T6CdBMGM660B3/14_files/image2025-5-14_14-23-19.png)

## Component properties

| Eximee Designer property                                                       | Attribute name in Source          | Description                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>Number of columns</strong><br>(section <strong>Layout</strong>)</p> | columns                           | The number of columns into which the checkboxes should be distributed (empty by default, meaning they are distributed in a single column). The value should be chosen with the component's readability in mind. Too many columns can make the content, descriptions, icons, or links associated with the checkboxes difficult to read. |
| Whether to mark the change in the summary (section **Other**)                  | changedByUserSummaryInfoCondition | Specifies whether a change in the component value should be marked in the Application Summary component (FormSummary). This property applies only in forms using the Application Summary component.                                                                                                                                    |

> 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.md)

<figure><img src="https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/MjJJSoDR5zwLtG77x1va/14_files/image2025-5-19_12-36-46.png" alt=""><figcaption><p><em><strong>Figure 1.</strong> Example appearance of the component on the application.</em></p></figcaption></figure>

## Arranging checkboxes in columns

When a larger number of columns is set, the checkboxes are arranged sequentially in rows, from left to right.

For example, for 6 items and 3 columns, the layout will be as follows:

```
1  2  3
4  5  6
```

An example of checkboxes powered by the same data source — for one, two, and three columns — is shown in Figure 1.

## Dictionary as a data source

The component can receive data from a dictionary. It is enough to attach the previously created dictionary in the field **EXTERNAL DATA SOURCE**.

## Script as a data source

In CheckboxGroup components in **EXTERNAL DATA SOURCE** (External Data Source), you can attach scripts which, apart from the field **Id**, return different values depending on the selected input options. This makes it possible to define the content of the checkboxes displayed in the group according to our needs and the dependencies entered on input in a dynamic way.\
We can define the display of a checkbox with an icon, description, additional description, a link that opens a popup, the popup title, popup content, the number of checkboxes displayed, and whether they are selected.

Example implementation of a data-providing script returning predefined field descriptions and icons depending on the selected input options:

{% code title="demo-checkbox-group-items-with-popup.js" expandable="true" %}

```javascript
function callService(context) {
    const isNullOrFalse = v => v === false || v === 'false' || v == null;
    const withoutDescription = context.getFirstParameter("withoutDescription");
    const withoutIconUrl = context.getFirstParameter("withoutIconUrl");
    const withoutPopupLinkText = context.getFirstParameter("withoutPopupLinkText");
    const withoutPopupContentHtml = context.getFirstParameter("withoutPopupContentHtml");
    const withoutPopupTitle = context.getFirstParameter("withoutPopupTitle");
    const withCount = +context.getFirstParameter("withCount") || 3;

    const items = [];
    for (let idx = 1; idx <= withCount; ++idx) {
        items.push({
            id: 'checkbox' + idx,
            text: 'Option ' + idx,
            description: isNullOrFalse(withoutDescription) ? 'Field description ' + idx : null,
            iconUrl: isNullOrFalse(withoutIconUrl) ? 'assets/icons_3d/CA019_ic3d_wallet.png' : null,
            popupLinkText: isNullOrFalse(withoutPopupLinkText) ? 'More' : null,
            popupContentHtml: isNullOrFalse(withoutPopupContentHtml) ? 'Formatted <strong>text</strong> <em>from the service</em> in the popup.' : null,
            popupTitle: isNullOrFalse(withoutPopupTitle) ? 'Sample content' : null
        });
    }
    return items;
}

```

{% endcode %}

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FVhQQP65ijCH7OOUbmxRu%2Fimage.png?alt=media&amp;token=d310effc-d03e-4ca5-981a-47793d1ea146" alt=""><figcaption><p><em><strong>Figure 2.</strong> Example of connecting outputs in a component powered by a script.</em></p></figcaption></figure>

## Data model

The state of each checkbox group option is stored separately in the data model. In the field **Data model key** you should specify the model node, and under it create fields whose names match the option identifiers, i.e. the values `id` returned by the dictionary or script. The fields are optional — more information in [Data model in the interface](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/praca-z-komponentami-bazowymi/model-danych-na-interfejsie.md#komponenty-o-wartosci-zlozonej).

* A selected option has the value `true`, and an unselected one `false`.
* When the form is opened, the state of the options is read from the data model: the options whose fields have the value `true`, and any other value or no value means the option is not selected.
* A field whose name does not correspond to any option in the list is ignored.
* If the data source itself determines whether an option is selected, it takes precedence over the value from the model.

Example: the script from the previous section returns the options `checkbox1`, `checkbox2` and `checkbox3`. In the component, set **Data model key** `preferences`, and in the model fields were created only for the first two options:

```
preferences
├── checkbox1
└── checkbox2
```

The user selects the options `checkbox1` and `checkbox3`. After saving the application, the model contains:

```
preferences.checkbox1 = true
preferences.checkbox2 = false
```

Option `checkbox3` does not have a field in the model, so its selection does not get into the data model.

{% hint style="warning" %}
The data model key must point to a node with fields. If it points to a single field, the value is neither saved in nor read from the model.
{% endhint %}

{% hint style="info" %}
Demo application: demoGesCheckboxGroup
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/2-pola-wyboru/checkbox/grupa-checkbox-checkboxgroup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
