Set Toggle Switch State

Block Information

Available in: Page Flow

Toolbox Category: Input

Block Type: Regular

Set Toggle Switch State is a regular block that allows you to set the state of Checkbox and Toggle Switch elements on a page or form.

The block comes in two modes which are discussed below.

Mode 1

Set Toggle Switch State (Mode 1)

The Mode 1 version of the Set Toggle Switch State block consists of (from left to right):

Mode 2

Set Toggle Switch State (Mode 2)

The Mode 2 version of the Set Toggle Switch State block consists of (from left to right):


Usage Examples

The image below shows an example of the Mode 1 version where the Data value parameter is attached to a Variable Value block configured to use the variable b which has been set to "true". This would toggle the switch to the "ON" position.

Example of Set Toggle Switch State Mode 1

In the next example we see a Mode 2 version where the Element value parameter is attached to a Text block containing a CSS Selector that selects the same element. This time the Data value parameter is attached to the True/False block containing the value "false". This would toggle the switch to the "OFF" position.

Example of Set Toggle Switch State Mode 2

Last updated