Use the <toggle> tag to add and configure the toggle selector. The toggle does not require additional confirmation, so any methods related to it will be called immediately as the toggle position changes.
Available attributes:
Attribute
Type
Mandatory
Description
checked
Boolean
N
To enable the toggle, set the value to true. The default value is false.
disabled
Boolean
N
To disable the toggle for users, set the value to false. The default value is false.
onChange
Function
N
Specify a function called when the position is changed.Set the attribute value to the customs_widget_custommethod created in the client script.
text
String
N
Specify the text that explains how the toggle works.
isLeftSideText
Boolean
N
To locate the text on the left of the toggle, set the value to true. The default value is false.
boldText
Boolean
N
To make the text of the toggle bold, set the value to true. The default value is false.