CMS - Module Conditional Fields
Using conditional fields
## Introduction
A field condition dictates whether or not a field should be visible in a module form. It uses a (set of) condition(s),
applied on the value of other module fields, to determine whether or not the field should be displayed in the form.
### Configuring a condition
To use a field condition in your module, you need at least two fields: one field to trigger the condition
and the other to have the condition applied to.
A conditions definition consists of the following attributes:
* ``field`` The name of the field that triggers the condition
* ``operator`` The operator to use for comparison
* ``value`` The value used by the condition for comparison
See the [documentation](https://docs.angrybytes.com/p/abc-manager/6.0/docs/cms/module_definitions/conditions/index.html)
for more detailed configuration options.
#### Example
In this example we will create an radio field (``media_type``) show and hide two single relation fields (``image_id``
and ``youtube_id``), based on the value selected in the enum.
If the value of ``media_type`` equals ``image``, the single relation ``image_id`` will be show and ``youtube_id``
will be hidden. If ``media_type`` value equals ``video``, the opposite will happen.
```xml
```