Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Merged branch "DOC0000070" into parent
Use the <toggle> tag to add and configure the a toggle selector. The toggle does not require additional confirmation, so any functions related to it will be called immediately as the toggle position changesposition is saved immediately after it is changed. Saving the record is not required.
Available attributes:
Attribute | Type | Mandatory | Description |
---|---|---|---|
checked | Boolean | N | Set the attribute equal value to true to enable select the toggle by default. The default value is false. |
disabled | Boolean | N | This attribute defines if the position of the toggle can be changed by the users. True - the toggle is inactive, false - the users can change its positionSet the value to true to disable the toggle for users. The default value is false. |
onChange | Function | N | The method Specify a function called when the position of the toggle changesis changed. Set the attribute value to the custom s_widget_custom method created in the client script. |
text | String | N | The text explaining the function of the toggle to the users. By default, it is located on the right from the toggle.Specify the text that explains how the toggle works. |
isLeftSideText | Boolean | N | If set Set the value to true, to position the text is located on the left from of the toggle. If set to false, the text is located on the right from the toggleThe default value is false. |
boldText | Boolean | N | Set the attribute equal value to true to make the text of the toggle bold. The default value is false. |
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
<toggle text={data.text}"Active" checked="true" disabled="truefalse"></toggle> |
The template above adds a disabled toggle to the page: Image Added