Toggles
Toggles can be used to control T/F Properties or Relationships or records in your Adalo Collections.
Overview
Toggles are a type of button that let your users quickly update data in your app. There are two common uses for toggle:
Update a True/False property of a record
e.g. if your Users collection has an "Is Admin" property or if your Trips collection has an "Is Draft" property
Clicking the toggle will update whether the Trip the user is viewing is a draft or not.
Update the relationship between two records
e.g. if your Trip collection has a relationship property called "Travel Party" that relates to multiple user records
Clicking the toggle can update whether the Logged In User is a member of the Travel Party or not
Adding a Toggle
Click the "+" button in the left toolbar to open the add panel.
Scroll down and the expand the "Buttons" category
Click and drag the Toggle on to one of your screens
In the left panel configure the Toggle Settings
Select what should be toggled. You can select any True/False property for any available record on the screen, or any Relationship property that connects the available records.
Select the icons and colors for the toggle when it's True and When it's false. By default, the icons are for selected and empty checkboxes.
Toggles in Lists
Toggles can also be added to items in Custom Lists.
Click the "+" button in the left toolbar to open the Add Panel
Scroll down and expand the "Lists" category
Select "Custom List" and drag it on to your screen
In the left edit panel for the custom list, select which collection this is a list of
Scroll down and open the "Components" category of the list components settings
Click Add Component
In the Add Panel, scroll down and expand the "Buttons" category.
Click and drag the toggle into the first list item on your screen.
Configure the toggle as described above. You can toggle a True/False Property of the list item, or your can toggle whether the list item has a relationship to another available record on your screen. For example, if you are viewing a Trip, and the Custom List is a list of users, you can Toggle whether the user is a member of the Trip's Travel Party.
Last updated