> 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/edytor-oswiadczen.md).

# Statements editor

For components **Statements** and **Layer statements** a specialized editor is available. It allows statements to be defined using the JSON format.

## Editor location

The statement editor is available in the **Basic properties** components **Statements** and **Layer statements**.

<div data-with-frame="true"><img src="/files/c6176855144d07dd6a4ad8b2ec7d370f8cf2dd8c" alt=""></div>

<p align="center"><em><strong>Figure 1.</strong> Placement of the statement editor</em></p>

The editor is opened by clicking **Add statement**.

## Editor preview

Opening the statement editor slides out a drawer presenting the area for entering text in JSON format. For a newly created component, it contains only curly braces with no content. Line numbers are visible on the left side of the editor.

The statement editor can be displayed in read-only mode and in edit mode. Read-only mode allows only viewing the saved values.

<div data-with-frame="true"><img src="/files/a90be0e08767892afd89726538f970209b667c25" alt="Figure 2. Appearance of the statement editor for a newly created component"></div>

The editor underlines both semantic and syntax errors in real time. When you hover the mouse over the red underline symbolizing an error, a tooltip displaying its content is shown.

<div data-with-frame="true"><img src="/files/79397fc3a4149080adf20d5989d580dddd35fe23" alt="Figure 3. Example information about field requirements"></div>

## Editor behavior

The statement editor supports syntax suggestions. After pressing the key combination **Ctrl + Space** a suggestion is displayed containing the fields that can be entered depending on the current cursor position in the editor. Selecting one of them and pressing **Enter** inserts the given suggestion into the editor.

<div data-with-frame="true"><img src="/files/c6475f41dd98827c0e09175345e513ed2045f67a" alt="Figure 4. Suggestions displayed after pressing Ctrl + Space"></div>

The editor can be closed in two ways. The first is the symbol **X** located in the top right corner (visible in Figure 2). The second way is to click outside the editor area.

{% hint style="info" %}
If the data entered when closing the editor is semantically and syntactically correct, it is saved. If it contains any error, the changes are discarded. In both cases, the drawer closes.
{% endhint %}

## Available fields

The statement editor accepts the fields listed below. Their meaning will be explained in the next paragraph. Required fields are additionally marked:

{% code title="Example JSON structure" expandable="true" %}

```json
{
  "items": [
    {
      "controls": [
        {
          "mid": "text",                 // required
          "titleKey": "text",           // required
          "type": "CHECKBOX|RADIO",      // possible values CHECKBOX or RADIO, required
          "visibleCondition": "text", 
          "styleName": "text",
          "requiredCondition": "text",
          "notSelectedErrorTextKey": "text",
          "requiredNotAcceptedErrorTextKey": "text",
          "mastercheckbox": "text"
        }
        // ...
      ],
      "actionBindings": {
        "bindings": [
          {
            "event": "EDIT"             // possible value EDIT, required
          }
          // ...
        ]
      },
      "mid": "text",                   // required
      "textContent": "text",
      "textContentUnexpanded": "text",
      "visibleCondition": "text",
      "expandableCondition": "text",
      "expandedCondition": "text",
      "descriptionKey": "text",
      "nativePopupTitleKey": "text",
      "styleName": "text"
    }
    // ...
  ]
}
```

{% endcode %}

### Field meanings

| Property                  | Description                                                                                                                                                                                                                                                                                                            |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **items**                 | List of defined statements to display.                                                                                                                                                                                                                                                                                 |
| **textContent**           | An artifact with the statement content displayed below the title specified in **titleKey**. If the artifact is specified and the key **titleKey** and the control defined in **controls**, the textContent content will not contain a control.                                                                         |
| **textContentUnexpanded** | An artifact with the statement content displayed when the statement is collapsed.                                                                                                                                                                                                                                      |
| **mid**                   | Business identifier of the given statement.                                                                                                                                                                                                                                                                            |
| **visibleCondition**      | Conditions under which the given statement is to be displayed. If the condition is empty or invalid, the value "true" will be evaluated.                                                                                                                                                                               |
| **styleName**             | Style name.                                                                                                                                                                                                                                                                                                            |
| **expandableCondition**   | Condition for which the expand/collapse text for the statement content should be displayed next to the statement title. If the condition is empty or invalid, the value "false" will be evaluated. Note: if **titleKey** is undefined, the text will not appear.                                                       |
| **expandedCondition**     | If **expandableCondition** is set to "true", the property **expandedCondition** determines whether and when the statement content should be expanded by default. If the condition is empty or invalid, the value "true" will be evaluated (content expanded).                                                          |
| **titleKey**              | The title key of a single statement defined in the tab **Translations**. Variables are resolved in the keys.                                                                                                                                                                                                           |
| **nativePopupTitleKey**   | Title key of the native popup that appears when clicking "More" → this text can be overridden by i18n.statements.item.native.more in the tab **Translations**. The popup is shown only in the native app. If **nativePopupTitleKey** is not defined, the value of the key will be displayed as the title **titleKey**. |
| **event**                 | Event that should be added if an action on the request has been defined and is associated with a given statement item.                                                                                                                                                                                                 |
| **controls**              | List of defined controls for the given statement. An explanation of the object fields is below. **controls** is below.                                                                                                                                                                                                 |

### **Defining a list of controls (controls)**

| Property                            | Description                                                                                                                                                                                                                               |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **mid**                             | Business identifier of the control (required field).                                                                                                                                                                                      |
| **titleKey**                        | Title key displayed next to/above the control.                                                                                                                                                                                            |
| **visibleCondition**                | Conditions under which the given control should be displayed. If the condition is empty or invalid, the value "true" will be evaluated. Example conditions: "js:true/false" or "js:getValue("GesComplexComponent4.GesCheckbox2")=="true". |
| **requiredCondition**               | Condition for which the control should be required. If the condition is empty or invalid, the value "true" will be evaluated.                                                                                                             |
| **type**                            | Control type: **RADIO** - a statement with two YES/NO radio buttons (other types such as CHECKBOX may also occur according to the JSON definition).                                                                                       |
| **notSelectedErrorTextKey**         | Translation key overriding the text "You have not made a selection".                                                                                                                                                                      |
| **requiredNotAcceptedErrorTextKey** | Translation key overriding the text "Acceptance of the selected statement is required".                                                                                                                                                   |
| **styleName**                       | Style name.                                                                                                                                                                                                                               |
| **mastercheckbox**                  | Master checkbox ID.                                                                                                                                                                                                                       |


---

# 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/edytor-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.
