Toggle Field
A checkbox rendered as a switch.
Settings:
- colour of the switch, including
dangerandwarning
Behaves exactly like a checkbox — same stored value, same filtering. The difference is that a switch reads as "on or off" at a glance, which is what you want for a flag that changes how a block behaves.
Colour is worth using when the flag is destructive or unusual: a red switch beside hide from search is noticed, a grey checkbox is not.
Output:
html
{if $is_featured}…{/if}