# Checkbox

Capture a True or False input from a user.

***

{% embed url="<https://www.youtube.com/embed/_kFy0eT3JQs?autoplay=1&rel=0&vq=1080>" %}
Add a checkbox
{% endembed %}

***

### Properties

1. **Checked**

   The value the user should see when the page loads for the first time. Choose from True, False or populate your checkbox with a bit/boolean value from your data.
2. **Read-Only**

   Set to True if you want the control to display as read-only (value can't be changed) on the page.
3. **Visible**

   Set to False if you don't want this control to render on the page and be visible to the user.

***

### Assigning data to a Checkbox

Example:

To display a checked Checkbox when the value retrieved by a SQL query equals 'True' (or a similar value, like 'Yes'):

1. Use an appropriate [Event](/features/events.md), e.g. *Load* (page) or *Click* (button) to which a *Decision* and a [*SetValue* ](/actions/set-value.md)action can be added.
2. Add an If/Else [*Decision*](/actions/decision-if-else.md) action to determine the value of the variable.
3. If the value is 'True', add a [SetValue](/actions/set-value.md) action to assign the 'True' value and the checked state to the CheckBox's *Checked* property.

***

### Retrieving data from a Checkbox

Properties that can contain data:

* Checked

Use an [action](/actions.md) to capture the values from the control. Go [here](/controls.md) for more details on how to collect data from controls.

***

### Events

1. **Change**

   An event that triggers when the checkbox is checked or unchecked.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stadium.software/controls/checkbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
