# Conditional Visibility

This is a powerful and popular feature and is useful for anybody building typical input forms. The main principles behind this parameter are to show or hide fields based on the values of other fields.\
\
An example might a simple name and address form, where you only want to ask certain questions based on their location. These questions would not appear if the location was not the one required.

<div data-full-width="true"><figure><img src="/files/YhvgmCh4FRjCjz9xZyGW" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
It's important to note, when the field is hidden as a result of this parameter then it is considered not to exist on the form. This is by design to give you more control over how the form behaves. This means it wont be affected by rules or other actions happening on the form.\
\
If you wish to hide fields but keep the functionality for them in the bloc then use the field visibility setting [Visually Hide in the form but remain functional](/blocworx-documentation/bloc-editor/managing-a-field/field-parameters/choose-hidden-options-for-this-field.md#visually-hide-in-the-form-but-remain-functional).
{% endhint %}

### Hide when creating new record

Hides the field **only when the form is used to create a new record**.

### Choose if all fields must equal their values or not

The default option when this is not set is that all fields **must** equal their values. You can use this setting to decide that you only require at least one of the fields to equal their values.

### Choose if the field will be shown or hidden as a result of the conditions being met:

We can use this option to toggle the behaviour that we want to happen when the values are met or not.

| Option         | Behaviour                                                                                                        |
| -------------- | ---------------------------------------------------------------------------------------------------------------- |
| Show the field | If the criteria is met, i.e. if the values equal what they need to equal then allow this field to appear.        |
| Hide the field | If the criteria is met, i.e. if the values equal what they need to equal then prevent this field from appearing. |

### Functionality when hidden

| Option                               | Behaviour                                                                                          |
| ------------------------------------ | -------------------------------------------------------------------------------------------------- |
| Option                               | Behaviour                                                                                          |
| Completely hidden and disabled       | The field is invisible and entirely inactive—it won’t trigger rules or be included in submissions. |
| Visually hidden but fully functional | The field is hidden from view but still active, allowing it to trigger rules and submit data.      |

### Select Field & Type the word/string it must be equal

Here we can begin to add the fields and the values they must be equal to for our criteria set out above to be met.

{% hint style="success" %}
\[**blocworx-any-word]** is our built in "wildcard" value, what this means is that the field can equal any value at all and it will consider the criteria to be met. By Clicking "Tick for any value" it automatically populates the value required with this wildcard value.
{% endhint %}

### Tick for any Value

Triggers the condition if the selected field has any non-empty value.

### Tick for between values

Triggers the condition if the selected field’s numeric value falls within a specified range.

<br>


---

# 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://manual.blocworx.com/blocworx-documentation/bloc-editor/managing-a-field/field-parameters/conditional-visibility.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.
