{{ toggle }}

Represents an on/off toggle control

Properties

string object_type
Will always be "toggle".
true/false is_valid
Always true.
string value
on_value or off_value.
html output
on_label or off_label.
html output_in_list
Same as output.
string field_id
The identifier for this field.
html default_value
The default value for this field if no value is specified.
true/false on
True if the toggle is "on". False if it is "off"
string on_label
The text to be displayed when the toggle is "on"
string on_value
The value represented by the "on" position
string on_color
The color of the toggle when it is "on" (could be any valid CSS color)
string off_label
The text to be displayed when the toggle is "off"
string off_value
The value represented by the "off" position
string off_color
The color of the toggle when it is "off" (could be any valid CSS color)

Examples

<p>Show subscriptions? <strong>{{ entity.show_subscription_form }}</strong></p>
{% if entity.show_subscription_form.on %}
	{% include "Subscription Form" %}
{% endif %}

Developer Overview

Liquid Markup