# Condition Actions&#x20;

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

You can choose actions after you set up condition options and values. Let's take the Veterinary Appointment Booking calculator. So if you choose the "is selected" condition, "Dermatology" from the value and "show" from the option.&#x20;

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FbKRcGkwFWIPTIhs87VKA%2F1.png?alt=media&#x26;token=1f2801a2-2db0-4d5e-9b0c-37f131e43436" alt=""><figcaption></figcaption></figure>

The calculator will open up the Dermatologist field so that users can choose their dermatologist.

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FlvHcfi8K4WkBqp2TJntJ%2F3.gif?alt=media&#x26;token=025a5c30-cd0a-46ac-bdd2-f7232f814eb3" alt=""><figcaption></figcaption></figure>

There are these actions available to choose from:

* <mark style="color:red;">**\***</mark>**Hide -** This will hide the chosen value if users choose this option.
* <mark style="color:red;">**\***</mark>**Show -** This action will show the element if it is hidden.
* **Hide (leave in total) -** This action will hide the value but leave it in the total for users.
* **Unset -** This action will reset the predefined settings if the condition is met.
* **Disable -** Enable this and users will not be able to choose if the condition is met.
* **Set value -** This action allows you to set up another default value if the condition is met.
* **Set value and disable -**  This will set up another default value and users will not be able to change it.
* **Select option -** This action will let you choose the option of the field when the condition is met.
* **Select option and disable -** This will set up another default option and users will not be able to change it.
* **Set date -** This action allows you to set up another default date if the condition is met.
* **Set date and disable -** This will set up another default date and users will not be able to change it.
* **Set period -** This will set up another date range if the condition is met.
* **Set period and disable -** This will set up another date range and users will not be able to change it.
* **Set time -** This will set another time if the condition is met.
* **Set time and disable -** This will set up another time and users will not be able to change it.

***

<mark style="color:red;">**\***</mark>when dealing with '**Hide**' and '**Show**' actions, it is important to be familiar with the related settings in the element settings:

#### **1. Hidden by Default**

On the **Settings tab** of the elements you can find the setting **'Hidden by default':**

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FdxdHstcCfnUuilvapcFd%2Fimage.png?alt=media&#x26;token=83e08093-dc05-4e9d-b9cb-2b00d659c76d" alt=""><figcaption></figcaption></figure>

If enabled, the element will be hidden in the calculator and its value will be counted as zero in [**formula fields**](https://docs.stylemixthemes.com/cost-calculator-builder/calculator-elements/total). By utilizing the conditional system of the Cost Calculator, you can make the element visible again if it meets the specified condition by using the '**Show**' action:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2Fn1RpZDvaKqLB7mey4E9o%2Fimage.png?alt=media&#x26;token=e11752bd-cfa8-4791-85ef-3aac6f923c4e" alt=""><figcaption></figcaption></figure>

The result on the front-end:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FvcYbCIA8yxoxPAQs12hD%2FCalculators%20%E2%80%B9%20StyleMix%20%E2%80%94%20WordPress.gif?alt=media&#x26;token=66250e65-1bf8-4c19-9776-bae3e92b8366" alt=""><figcaption></figcaption></figure>

#### 2. Calculate Hidden by Default

On the **Settings tab** of the elements you can find the setting **'Calculate hidden by default':**

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FNrIbGBaaLkyLRF8odCqr%2Fimage.png?alt=media&#x26;token=c16de472-5223-46ad-a380-c5efa5ccc78f" alt=""><figcaption></figcaption></figure>

If any case hides the element: via the '**Hidden by Default'** setting or by '**Hide**' action, the element's default value (if it is set) will be counted in the formula. If the setting is disabled, regardless of its value, in formulas it will be counted as zero:

{% tabs %}
{% tab title="Calculate hidden by default is ON" %}
Calculate hidden by default is <mark style="color:green;">**ON**</mark>

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FnzEb1aEgPRa0yjyzuuoF%2FCalculators%20%E2%80%B9%20StyleMix%20%E2%80%94%20WordPress%20(1).gif?alt=media&#x26;token=72b1c9dd-0be4-4f8f-bc33-fb89251aac2a" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Calculate hidden by default is OFF" %}
Calculate hidden by default is <mark style="color:red;">**OFF**</mark>

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2F3CbBlSUAbAE3HP6Yt4yY%2FCalculators%20%E2%80%B9%20StyleMix%20%E2%80%94%20WordPress%20(2).gif?alt=media&#x26;token=079e0963-0999-4307-b760-7a9a111ffc37" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Make sure that you are using logically correct conditions and choosing the proper elements for them.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.stylemixthemes.com/cost-calculator-builder/conditional-system/condition-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
