Skip to content

Checkbox

A single boolean toggle for yes/no or true/false values. Renders as an HTML <input type="checkbox"> with a label.

Properties

PropertyTypeDefaultDescription
nametext''The field name. Must match your database column name.
labeltext''The text displayed next to the checkbox.
requiredbooleanfalseWhether the checkbox must be checked for form submission (useful for "agree to terms" fields).
checkedbooleanfalsePre-check the checkbox. Supports expression binding (e.g., {{ item.is_active }}).

Events

  • onChange -- Fires when the checkbox is toggled.

Example

An "agree to terms" checkbox:

name: agree_terms
label: I agree to the Terms and Conditions
required: true

A newsletter opt-in:

name: subscribe_newsletter
label: Subscribe to our newsletter
required: false

An edit form with a pre-checked value:

name: is_active
label: Active
checked: "{{ item.is_active }}"

Tips

  • Place inside a Form Container for the value to be included in form submissions.
  • The submitted value is true when checked, false when unchecked. This maps naturally to boolean columns in your database.
  • For a group of selectable options (multiple choices), use the Radio Group widget for single-select or a set of Checkboxes for multi-select.
  • For filtering data with checkbox options, use a Checkbox widget with an onChange event to trigger pipeline filtering.