> ## Documentation Index
> Fetch the complete documentation index at: https://docs.penbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkbox Field

> Single yes/no option for agreements, consent, and binary choices

The Checkbox field captures a single yes/no or true/false value. Checkboxes are ideal for agreements, consent flags, feature toggles, and any binary decision where the user confirms or denies something.

Use Checkbox fields when you need a simple on/off value. Unlike Multiple Choice fields (which allow selecting multiple options from a list), Checkbox fields represent a single boolean decision.

## When to Use

**Use Checkbox fields for:**

* Terms and conditions agreements
* Consent flags (marketing, data processing)
* Feature toggles (enable/disable)
* Confirmation checkboxes ("I confirm this information is accurate")
* Binary status indicators (active/inactive, enabled/disabled)
* Opt-in/opt-out preferences
* Acknowledgments

**Consider alternatives:**

* Use **Choices** for yes/no/maybe or multiple options
* Use **Multiple Choice** for selecting multiple items from a list
* Use **Text** or **Number** for non-binary data

## Configuration Options

| Option        | Description                   | Type    | Default          | Example                           |
| ------------- | ----------------------------- | ------- | ---------------- | --------------------------------- |
| `key`         | Unique identifier             | String  | Required         | `terms_agreed`                    |
| `name`        | Display label                 | String  | Required         | "I agree to terms and conditions" |
| `description` | Help text for users           | String  | Optional         | "Required to proceed"             |
| `required`    | Must be checked to proceed    | Boolean | `false`          | `true`                            |
| `default`     | Default checked state         | Boolean | `false`          | `false`                           |
| `visibility`  | Display setting               | String  | `always-visible` | `hide-when-empty`                 |
| `section`     | Section this field belongs to | String  | None             | Section UUID                      |

## Examples

### Terms Agreement

Require agreement to terms:

```json theme={null}
{
  "key": "terms_agreed",
  "type": "checkbox",
  "name": "I agree to the terms and conditions",
  "required": true,
  "description": "You must agree to proceed"
}
```

### Marketing Consent

Opt-in for marketing communications:

```json theme={null}
{
  "key": "marketing_consent",
  "type": "checkbox",
  "name": "I agree to receive marketing communications",
  "default": false,
  "description": "Optional - we respect your privacy"
}
```

### Data Accuracy Confirmation

Confirm data is correct:

```json theme={null}
{
  "key": "data_confirmed",
  "type": "checkbox",
  "name": "I confirm the information provided is accurate and complete",
  "required": true
}
```

### Feature Toggle

Enable optional feature:

```json theme={null}
{
  "key": "enable_premium_features",
  "type": "checkbox",
  "name": "Enable premium features",
  "default": false,
  "description": "Additional features available with premium plan",
  "visibility": "hide-when-empty"
}
```

## Validation

Checkbox fields have simple validation:

### Required Validation

* If `required: true`, checkbox must be checked to proceed
* Useful for mandatory agreements (terms, privacy policy)
* Prevents form submission when unchecked

### Boolean Value

* Checked = `true`
* Unchecked = `false`
* Stored as boolean in case data

<Info>
  Checkboxes that are not required can remain unchecked, storing `false` as the
  value.
</Info>

## Checkbox in Automations

Checkbox fields enable powerful conditional logic:

**Status transitions:**

* Move to "Ready for Approval" when all confirmations checked
* Trigger compliance review when specific consent given
* Prevent progress until required checkboxes checked

**Conditional steps:**

* Show additional form when premium features enabled
* Send different email based on consent preferences
* Trigger workflows based on toggle state

**Notifications:**

* Alert team when critical checkbox checked
* Send confirmation when consent given
* Notify compliance when data processing agreed

**Example automation:**

```json theme={null}
{
  "watch": ["data.terms_agreed", "data.data_processing_consent"],
  "condition": {
    ":and": ["{data.terms_agreed}", "{data.data_processing_consent}"]
  },
  "action": {
    "type": "status_transition",
    "status": "ready_to_proceed"
  }
}
```

[Learn more about Automations →](/cases/automations)

## Best Practices

**Use clear, affirmative language:**

* "I agree to receive..." (clear what checking means)
* Avoid double negatives ("I don't want to not receive...")
* State the action being confirmed

**Don't overuse checkboxes:**

* Too many checkboxes overwhelm users
* Group related agreements when possible
* Consider single confirmation with linked terms

**Mark required appropriately:**

* Only mark required if absolutely necessary
* Explain why it's required in description
* Legal requirements should be clearly stated

**Default unchecked for consent:**

* Marketing consent should default to `false`
* Optional features should default to `false`
* Never pre-check consent checkboxes (regulatory compliance)

**Use for regulatory compliance:**

* GDPR consent requires explicit checkbox
* Terms agreements need clear checkbox
* Maintain audit trail of when checkbox was checked

**Visibility settings:**

* Keep consent checkboxes always visible
* Use "hide when empty" for optional toggles
* Never hide required checkboxes

***

## Related Field Types

<CardGroup cols={2}>
  <Card title="Multiple Choice" icon="list-check" href="/cases/data_schema/multiple_choice">
    Use for selecting multiple items from a list
  </Card>

  <Card title="Choices" icon="circle-dot" href="/cases/data_schema/choices">
    Use for yes/no/maybe or multiple options
  </Card>

  <Card title="Text" icon="text" href="/cases/data_schema/text">
    Use for free-form agreement text or detailed consent
  </Card>

  <Card title="Data Schema Overview" icon="sitemap" href="/cases/data_schema">
    Back to Data Schema overview
  </Card>
</CardGroup>
