> 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/7-komponenty-specjalne/oswiadczenia-statements/wiele-master-checkboxow-w-komponencie-oswiadczen.md).

# Multiple master checkboxes in the statements component

## Single master checkbox

By default, the statements component is displayed with one master checkbox. Regardless of the number of controls, such a checkbox selects them all.

<div align="center"><img src="https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/7iY6LDu5sFqkqCABSevk/10s_files/image2025-9-1_14-19-38.png" alt="Figure 1. Example appearance of statements with one master checkbox for one control 
(depending on the implementation, the appearance may vary)" width="563"></div>

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FtMrMUBWkblOTYYAmE61y%2FPrzechwycenie%20obrazu%20ekranu_2017-07-20_10-42-30.png?alt=media&amp;token=6f81c80b-188e-49d3-a632-200b031f2603" alt="" width="494"><figcaption><p align="center"><em><strong>Figure 2.</strong> Example appearance of the component with one master checkbox for two controls</em><br><em>(depending on the implementation, the appearance may vary)</em></p></figcaption></figure>

## Multiple master checkboxes

To display two or more master checkboxes, first define them by clicking **Add masterCheckbox** in the **MASTER CHECKBOX LIST** (masterCheckboxes).

![Figure 3. The MasterCheckbox List window with a defined list of two main checkboxes](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/VMZwY9sFjbnwfynsd1dE/10s_files/image2024-8-5_14-18-36.png)

{% stepper %}
{% step %}

#### Define master checkboxes

For each master checkbox, define:

* mastercheckboxId — The Id that will identify the master checkbox for the controls
* labelKey — The text key that will be displayed for the master checkbox with the specified id
* visibleCondition — The visibility condition of the master checkbox. Default value: "true".
  {% endstep %}

{% step %}

#### Associate the master checkbox with a control

To associate a master checkbox with a control, enter the master checkbox id in the control definition. Appropriate entries must be added in the component JSON (more about creating statements in [Statement Editor](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/7-komponenty-specjalne/oswiadczenia-statements/edytor-oswiadczen.md)).

Example (JSON fragment) showing the addition of master checkboxes "mCh1" and "mCh2" for statements:

{% code title="fragment.json" %}

```json
"items": [
    {
        "controls": [
            {
                "mid": "kontolka1",
                "titleKey": "kontrolka1",
                "requiredCondition": "js:false",
                "mastercheckbox": "mCh1",
                "type": "CHECKBOX"
            },
            {
                "mid": "kontolka2",
                "titleKey": "kontrolka2",
                "requiredCondition": "js:false",
                "notSelectedErrorTextKey": "",
                "mastercheckbox": "mCh2",
                "type": "CHECKBOX"
            }
        ]
    }
]
```

{% endcode %}
{% endstep %}
{% endstepper %}

![Figure 4. Example statements with three master checkboxes&#x20;
(depending on the implementation, the appearance may vary).](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/zjkADLJhhGfWloAqBGG8/10s_files/image2018-10-11_9-29-41.png)

When only one master checkbox is visible, the statements will look as below. The master checkbox key will not be displayed; instead, the default description will appear. In this case, the behavior of the master checkbox does not change and it still selects only those controls that have the parameter **mastercheckbox** indicating its id — in other words, this master checkbox does not select all controls.

![Figure 5. Example statements with one master checkbox visible&#x20;
(depending on the implementation, the appearance may vary).](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/PUNFzSBQPdKVcQGRhEpy/10s_files/image2018-10-11_10-15-45.png)


---

# 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/7-komponenty-specjalne/oswiadczenia-statements/wiele-master-checkboxow-w-komponencie-oswiadczen.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.
