> 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="/files/540effe34b35d9afa6c3b103d0848ade3931f299" 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="/files/9aff8823784a97a6d1e64830698437ff6bc874b9" 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](/files/7846c826b2512ddb1887de03afcf5004b625ff93)

{% 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](/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).](/files/6b3e1c4824b05aa4499a7ab3cc40bc15727f36e2)

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).](/files/38d8f266f8e1bbce0a8aa102fd87c3fee2418a0c)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
