---
title: "Checkbox"
description: "Collect one boolean answer as a checkbox or switch."
group: "Build forms"
order: 9
type: "reference"
parent: "fields"
keywords:
  - "checkbox"
  - "toggle"
  - "consent"
  - "boolean"
updated: "2026-07-14"
---

The checkbox field stores one boolean answer.

## Options and validation

| Option | Type | Default | Behavior |
| --- | --- | --- | --- |
| `appearance` | `checkbox` or `toggle` | `checkbox` | Changes the built-in control style |
| `required` | `boolean` | `false` | Requires the value to be true |

A required checkbox works for an acknowledgement the respondent has to accept. Don't mark an optional preference required, though — `false` is treated as an empty required answer, so leaving it unchecked fails validation.

## Add a checkbox field

In the dashboard, select **Add block**, choose **Checkbox**, and choose checkbox or toggle appearance.

```ts
const consentField = {
  id: "contact_consent",
  kind: "checkbox",
  label: "You may contact me about this request",
  required: true,
} as const;
```

<Callout variant="warning" title="Consent needs context">
  The stored boolean records what the form received — nothing more. The wording, lawful basis, policy links, and retention rules are still your team's responsibility.
</Callout>

## Related

- [Build a GDPR consent form](/guides/build-a-gdpr-consent-form): Put consent copy and data handling into one practical flow.
- [Data retention and deletion](/docs/data-retention): Understand the deletion controls Fillo currently provides.
- [Select](/docs/fields/select): Use explicit yes and no choices when both answers need labels.
