Skip to main content
Version: 1.20.1

toggle

Use the <toggle> tag to add and configure a toggle selector. The toggle position is saved immediately after it is changed. Saving the record is not required.

Available attributes:

AttributeTypeMandatoryDescription
checkedBooleanNSet the value to true to select the toggle by default. The default value is false.
disabledBooleanNSet the value to true to disable the toggle for users. The default value is false.
onChangeFunctionNSpecify a function called when the position is changed. Set the attribute value to the custom s_widget_custom method created in the client script.
textStringNSpecify the text that explains how the toggle works.
isLeftSideTextBooleanNSet the value to true to position the text on the left of the toggle. The default value is false.
boldTextBooleanNSet the value to true to make the text of the toggle bold. The default value is false.

Examples:

toggle
<toggle 
text="Active"
checked="true"
disabled="false"
></toggle>

The template above adds a disabled toggle to the page: