Change Permissions Using Dropdown Menu

I’m trying to implement a Google Drive-style permissions settings view whereby individual user permissions can be assigned to individual assets. In this instance there are 3 cases whereby users can be assigned view, edit permissions, or none at all.

Thus far I’ve been able to accomplish this using toggles: one for can view and another for can edit. This “works” though it’s not ideal IMHO due to the long delay (several seconds) between a user’s toggling a switch and when the additional action is reflected in the UI. That additional action is required to avoid a situation is which view permissions are toggled off but edit permissions are left on.

Google handles this via a dropdown and I’d like to know if the same thing is possible in Adalo and if so, how to go about it. I haven’t been able to figure out how on my own, nor have I found similar use cases in the forum.

If you have some ideas here please let me know. Thanks!
Screen Shot 2021-11-19 at 17.26.10

Hi @glamour_hammer,

As one of the options - you can use conditional visibility on the icons (e.g. you have blue checkbox icon and white checkbox icon near each text label).
The principle is similar to the one described here: Adalo hints: toggle imitation - YouTube
In the video I use an input field to store the value, but in your case it’ll probably be better to make the icons visible/invisible based on the actual permission settings.


1 Like

Thanks for the tip!

Using the same principles I was able to adapt this approach to my use case. For the benefit of the community I’ll elaborate a bit:

  1. Per the video I used a text field, setting visibility of the components based on that text field’s value.
  2. Clicking the “dropdown selector” changes the input value of the text field, as does the selection from that dropdown selector.
  3. This meant that I was dealing with more that 2 states, 4 in my case because I have two potential buttons (“view” and “edit”) and the corresponding dropdown menus. So I used a matrix for each possible state assigning a numerical value to each state: 1, 12, 3, 34
  4. Clicking the dropdown changes the field from 1 → 12 or from 3 → 34, and the dropdown menus visibility are set to appear if the text field contains either 2 or 4.
  5. The selection from the dropdown menu changes the text field back to either 1 or 3 based on the selection.

Hopefully that will help someone out down the line.

The last bridge to cross is figuring out how to set the default value. At the moment it’s set to 1 which in my case corresponds to “viewable.” However, if the asset is already “editable” by the user then this is mis-leading for the user because the selection viewable according to the default.


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