CMS: Adding and Setting Up a Switch Element
1 min read
Add a switch or toggle to allow people to turn something on or off. It is similar to a checkbox, however the action is usually instantaneous, such as showing or hiding specific results or enabling music or videos to play.
Step 1 | Adding and Setting up a Switch Element
- Click Add
on the left side of the Editor.
- Click User Input.
- Click and drag the switch element of your choice.
- Click Settings.
- Enter a value for the switch.
Note:
The value property of this switch is used in JavaScript code.
- Select or deselect the Toggled on by default checkbox.
Step 2 | Connecting Your Switch Element
- Click the switch on your site.
- Click the Connect to Data
icon.
- Click Connect a dataset to choose a dataset from the drop-down list.
- Click Toggled state connects to to:
- Choose an existing field in your collection.
- Click Add a new collection field to create a new field in your collection.
- Enter a field name.
- Select a field type.
Important:
Make sure you have a submit button on your page so visitors can submit their selection.
Did this help?
|