2022-09-30 11:39:35 -04:00
|
|
|
---
|
2022-10-25 09:18:18 -04:00
|
|
|
group: Widgets
|
|
|
|
title: Boolean
|
|
|
|
weight: 10
|
2022-09-30 11:39:35 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
The boolean widget translates a toggle switch input to a true/false value.
|
|
|
|
|
2022-11-02 13:18:06 -04:00
|
|
|
## Widget options
|
|
|
|
|
|
|
|
For common options, see [Common widget options](/docs/widgets#common-widget-options).
|
|
|
|
|
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|----|----|-------|-----------|
|
|
|
|
|default|boolean|`false`|_Optional_. The default value for the field|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
name: draft
|
|
|
|
label: Draft
|
|
|
|
widget: boolean
|
|
|
|
default: true
|
|
|
|
```
|