{{ Toggle }}

Represents an on/off toggle control

Properties

true/false is_valid
Always true
String field_id
The name of the custom field
String value
OnValue/OffValue
String properties
Any additional properties used to configure this field
String output
<span class="mp-field-value mp-field-toggle">OnLabel/OffLabel</span>
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)

Sample Use

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