How do I make sure that the user can only choose one option in the form? See my picture below.
For example, in the “mental” category, the user should only be able to choose 1 out of 6 options. If, for example, he chooses #2 then, he would not be able to tick any other box for that category.
One way to do this is to use actions; for example, when you click on a selector, it triggers actions for each selector next to it to change its status. Does this work for you? Perhaps you need to use some input field or a database to have a temporary variable to store the status of the fields.
To make a form where users can only choose one option per category (exclusive single selection, like radio buttons):
The proven native way I’ve used in surveys and forms:
Create a number property in your collection for each category (e.g., “Mental Choice”, default 0).
Use buttons for the options (each button has two states: State 1 as Default, State 2 as Selected):
State 2 (Selected) visibility: Current Collection > Mental Choice = 1 (for first option), = 2 for second, etc.
State 1 (Default) visibility: Current Collection > Mental Choice ≠ that number (or leave as default when State 2 is hidden).
On action: Update Current Collection > Mental Choice to that number.
This ensures only one button shows State 2 (Selected) at a time, others stay in State 1 (Default).
No extra actions needed.
If you prefer the toggle look:
Toggles are bound to boolean properties, so for exclusive selection, use separate booleans for each option.
On each toggle actions, add an action to set the selected boolean to true and the others to false.
This works, but with 6 options per category, it means more actions on each toggle. The button method with number property is cleaner and scales better for multiple categories.
Repeat for other categories with separate properties.