Two checkboxes at once!

Didn’t find an answer to this question. I have a base with tours and each tour can be group or individual, for this I made two checkboxes for each tour. When adding, we put a toggle one or the other, how can I make it so that it is impossible to put two at once. I hope I described it clearly?)))
The same is with editing, if I mark one checkbox, then the other should be unchecked.

1 Like

I asked a similar question. You can check out the thread here: Selecting one option or another on a single screen

Basically, you’ll want to create a true/false for each toggle type then a condition that will update the one selected to TRUE and the other one to FALSE. And vice versa.

Remember, the toggle button auto updates the database as soon as it’s selected on page load. So, if you want an option already selected, then add an action on the entire page so when a user visits the page it updates one of the true/false properties to TRUE and since it will be marked TRUE the other will automatically be marked FALSE because of your condition.

2 Likes

I have a slightly different situation, I need one checkbox to simply exclude the other. That is, a person marks an individual tour, then the tick is removed from the group tour and vice versa

Hey @Nikolay-Puh, I think it’s still pretty similar but maybe I’m misunderstanding.

Basically, when a user loads this page you are showing two options: Group OR Individual. Each of these is a True/False property in the DB, correct?

So, on the INDIVIDUAL toggle button, add an action that sets INDIVIDUAL to TRUE but at the same time it sets GROUP to FALSE. Then on the GROUP toggle button, add an action that sets GROUP to TRUE and also sets INDIVIDUAL to false. This way, whichever one you’re selecting will set the opposite one to false.

2 Likes

Hi @greg_noobdiscs @Nikolay-Puh,

You might find this useful:

6 Likes

This is great. Super helpful. Thanks for putting this together @Victor!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.