# Conditions

> Show one piece of text or another, depending on what you enter.

**If / Else** is a Smart Field that checks a condition when the snippet goes in, then shows one piece of text or another, depending on what you entered. Add it in the [rich text editor](https://simplefill.app/docs/rich-text-editor) with `{{`.

## Add an If / Else

1. In a rich snippet, type `{{` and choose **If / Else**, or use **Insert field** > **Conditions**.
2. Click the pill and set:
   - the field to check, and a **Condition**
   - **Compare with**: a **Fixed value** you type, or **Another field**
   - **Then show**: the text when the condition matches
   - **Otherwise show**: the text when it doesn’t
3. Click **Save changes**.

## What you can check

| Condition | Matches when the field… |
| --- | --- |
| **Equals** / **Does not equal** | is exactly the value (or isn’t) |
| **Contains** / **Does not contain** | includes the value somewhere (or doesn’t) |
| **Is empty** / **Is not empty** | was left blank (or wasn’t) |
| **Is greater than** / **or equal to** | is a bigger number or a later date |
| **Is less than** / **or equal to** | is a smaller number or an earlier date |

## Example: a plan-aware reply

With a Dropdown field `plan`:

- **Condition**: `plan` **Equals** `Pro`
- **Then show**: `As a Pro customer, you have priority support: reply here and we’ll answer within the hour.`
- **Otherwise show**: `We usually reply within one business day.`

## Tips

- **Equals** and **Contains** match capital letters exactly: `Pro` doesn’t equal `pro`.
- Greater-than and less-than compare numbers, or dates when one side is a Date field.
- **Then show** and **Otherwise show** are inserted exactly as typed. Fields typed inside them aren’t filled in.

## Where it works

If / Else works inside rich snippets and [Blocks](https://simplefill.app/docs/blocks) only. It can check a [Field](https://simplefill.app/docs/fields) or a [calculation](https://simplefill.app/docs/calculations), but not a [key press](https://simplefill.app/docs/key-presses) or a [Click](https://simplefill.app/docs/mouse-actions), which have no value.

Source: https://simplefill.app/docs/conditions
