Is it possible to display a button only if some conditions?

Hello,

I have 5 dropdowns, i would like that if the user haven’t selected something in the 5 dropdowns, the button to validate the setup (and update the content of the database users) don’t appear. Is it possible to setup that ? If yes, how ?

Hi @LuckyTravel,

For 5 dropdowns - only with nested groups + visibility condition on each group. You have Group1 which is visible when Dropdown1 → Name (or other prop) is not equal to Empty; then inside Group1 you have Group2 which is visible when Dropdown2 → Name (or other prop) is not equal to Empty; etc etc.

For 2 dropdowns you can use the conditions on the button itself.

Best,
Victor.

Ok, i see, thank you very much, i will try it in the next few days :slight_smile:

I also have another possibility but i don’t know if it’s possible to do that… i would like to have your point of view of that…

The other idea is to setup a default value in each dropdown menu. Like that, the user will have not need to select something in the dropdowns. (no risk of forgot by the user).

The plan is to display a default value, then, when the user clic on the button to validate the setup, the value is saved in the database users. My current problem is that i manage to display a defaut value, but when the user clic on the button to validate the setup, like it haven’t been selected, it’s not saved in the database users…

Have you an idea to put a default value and when the user clic on the button to validate the setup, it’s saved in the database users?

Hi @LuckyTravel,

Inside, dropdown is a List which displays multiple records from a collection. So in order to display a default value correctly, you need to take it from somewhere, which means you need to have an exact record from that collection available on a screen.
You may see a displayed record in a dropdown, but this usually comes from cache. So that’s why the relation isn’t updated - in reality there is no default record.

So if you’d like to have 5 dropdowns with correct defaults, you need to somehow provide these default records as Current X,Y,Z.. for each dropdown.
An alternative would be to add relationship properties to Users collection and “populate” them while onboarding the user (you will have to create single-item lists, but they could be presented as “continue” button on onboarding screens).
And when you have the properties set - you can use these properties as default values for dropdown.

Best,
Victor.

Hey,

I just did what you proposed me about the visibility and it works perfectly good !

Thank you very much :smiley:

I just tested also what you said about defaults values and it works :slight_smile: Thank you for all