Initialize Toggle Switch in Data Design
Initialize Toggle Switch in Data Design
is a regular block that is used to initialize Checkbox and Toggle Switch elements that were generated using the Content from Data Design block and dynamically added to the page or form.
![](https://docs.zingy.ai/~gitbook/image?url=https%3A%2F%2F3401585094-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmnBepgycwgisXr9ya1N4%252Fuploads%252FAfftBhrLGPjdPeOdS5gZ%252Fimage.png%3Falt%3Dmedia%26token%3D2e4f7316-a18d-4e81-aeb9-35fe7f431a2c&width=768&dpr=4&quality=100&sign=8d331720&sv=1)
The block consists of the following (from top to bottom):
Data Design: Selectable Input to choose the Data Design element whose element you want to target.
Element: Selectable Input to choose Checkbox / Toggle Switch elements, within the selected Data Design, you want to initialize.
ID: Optional Value Parameter that accepts a text value representing the unique value that was provided to the Content from Data Design block. See below for more details.
ID2: Optional Value Parameter that accepts a text value representing the secondary identifier that can be used to identify the desired element. See below for more details.
NOTE: For the most common use cases, the ID and ID2 values need to be blank when using the Initialize Toggle Switch in Data Design
block.
ID and ID2 usage
The behavior of this block depends on the ID and ID2 value parameters and is detailed below:
ID and ID2 not provided: Operate on the selected element for all generated instances of the same Data Design element.
ID2 provided and ID not provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID2 value.
ID provided and ID2 not provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID value. Since we recommend the ID value to be unique, this would choose one from all the generated instances of the associated Data Design element.
ID and ID2 provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID and ID2 value.
Usage Example
![](https://docs.zingy.ai/~gitbook/image?url=https%3A%2F%2F3401585094-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmnBepgycwgisXr9ya1N4%252Fuploads%252Fyj7dvfMkciSiPgGQcpGp%252Fimage.png%3Falt%3Dmedia%26token%3Dabe9d92f-49ea-4ead-9116-3d4f954c48c6&width=768&dpr=4&quality=100&sign=ad04b7ee&sv=1)
NOTE: The same example also applies for a Checkbox element.
Last updated