> For the complete documentation index, see [llms.txt](https://docs.stylemixthemes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stylemixthemes.com/cost-calculator-builder/conditional-system/conditional-system.md).

# Condition Creating Example

{% embed url="<https://youtu.be/xUwxooRP9Mg?si=-4LEAdcqtv-cqA0S&t=1122>" %}

Let's take an example of making the conditional system more clear.

Below you can see the initial view of the **Loan Form** sample calculator without any conditions.

![](https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2F6RIsoEWjkfSdrl0PZbPh%2FCCBN%20loan%20form.png?alt=media\&token=328dba4b-558f-49c2-beb5-fefd06240955)

For example, you want to create a condition for the **Annual Interest Rate** depending on the **Loan Amount**. So, you should create a link from the Loan Amount to the Annual Interest Rate.

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FahtESgSxOTKiUcowzzeF%2Fimage.png?alt=media&amp;token=9036a9ce-f977-4e1b-a8ec-575651d349e3" alt=""><figcaption></figcaption></figure>

**Condition:** if the loan amount is greater than 15 000, set the annual interest rate to 10; if the loan amount is less than 5 000, hide the annual interest rate element.

Below you can see how it is done:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FmEjnYxzLTiIFDFKM88kx%2Fimage.png?alt=media&amp;token=e46142ef-d5d5-40af-9886-fece4999e5c4" alt=""><figcaption></figcaption></figure>

Now it is time to see the result. The first picture is for the first condition. When the loan amount is set to 16 000, the annual interest rate should be set to 10.

![](https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FwbCVDlFHDyrmnHDqhfnQ%2FCCBN%20loan%20form2.png?alt=media\&token=a63c3d34-68b8-421a-aa64-6671945ee2de)

The second picture is for the second condition. When the loan amount is set to 3 000, the annual interest rate should be hidden.

![](https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FGgESYLRyXtHlG5bJMdfo%2FCCBN%20loan%20form3.png?alt=media\&token=82817e6d-aa09-4b31-afa4-737e81abe627)

In a similar manner, you can create different conditions for calculator elements, improving its functionality.


---

# 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.stylemixthemes.com/cost-calculator-builder/conditional-system/conditional-system.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.
