> For the complete documentation index, see [llms.txt](https://docs.premsoft.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.premsoft.de/en/plugins/product-configurator/admin-dashboard/conditional-logic.md).

# Conditional logic

With **conditions** you show or hide elements depending on previous answers. This way your customers only ever see the fields relevant to their selection – which keeps even complex configurations clear.

**Example:** The "Engraving text" field should only appear if the customer chose *Yes* for "Engraving wanted?".

## Setting up conditions

1. In the element tree, select the element that should be **controlled** (e.g. "Engraving text").
2. In the settings panel, open the **Conditions** tab.
3. Click **Add condition** and define:
   * **Field:** the reference field whose value is checked (e.g. "Engraving wanted?").
   * **Operator:** the type of comparison (see table).
   * **Value:** the comparison value (e.g. `yes`).

The element is only shown when the condition is met.

## Available operators

| Operator             | Meaning                                              |
| -------------------- | ---------------------------------------------------- |
| **equals**           | The value exactly matches the comparison value.      |
| **not equal**        | The value does not match the comparison value.       |
| **contains**         | The value contains the comparison value (substring). |
| **does not contain** | The value does not contain the comparison value.     |
| **is empty**         | Nothing has been entered/selected (yet).             |
| **is not empty**     | Something has been entered/selected.                 |

## Multiple conditions

If you create several conditions, **all** of them must be met (AND logic) for the element to appear.

## Good to know

* Visibility reacts **live** in the shop while the customer configures – without reloading the page.
* **Hidden required fields** are not enforced. A field hidden by a condition does not block adding to the cart.
* Conditions can be combined with all element types – including headings, notices and entire groups.

{% hint style="info" %}
**Tip:** When needed, control a whole [group](/en/plugins/product-configurator/admin-dashboard/layout-and-repeaters.md) with a condition. This way you show or hide several related fields with a single rule.
{% 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 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.premsoft.de/en/plugins/product-configurator/admin-dashboard/conditional-logic.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.
