Configuration

Below is the full configuration available with defaults values:

"example" => [
    "type"   => "anomaly.field_type.boolean",
    "config" => [
        "default_value" => false,
        "on_color"      => "success",
        "off_color"     => "danger",
        "on_text"       => "YES",
        "off_text"      => "NO",
        "mode"          => "checkbox",
        "label"         => null,
    ]
]
Configuration
Key Example Description
default_value true The default value.
on_color default The color of the "on" state. Valid options are `success`, `info`, `warning`, `danger`, and `default`.
off_color warning The color of the "off" state. Valid options are `success`, `info`, `warning`, `danger`, and `default`.
on_text Yeppers The text for the "on" state.
off_text No way! The text for the "off" state.
mode checkbox The input mode. Valid options are `radio`, `switch`, or `checkbox`.
label Yes, I agree to these terms. For `checkbox` mode only. The checkbox label.