Set dropdown field to read-only?


I can set input fields to read-only but how does it work for dropdowns? (I use primitive)
I would need this to have a view + edit mode of a form.

Thanks and best,

I usually do this so that I create different components for view and edit modes. Then I use visible property to decide which components are visible and which are not depending on view/edit mode. (Typically I add all view mode components to one Container and all edit mode component to another Container and toggle their visibility when changing the mode)

But the exact answer to your question is that I think it’s now possible to change the dropdown into a read-only component.

Hi Tomi,

thank you. Using two components makes it quite ugly if you have lots of dropdowns.
You mentioned that is should be possible to change the dropdown into a read-only component.
How does this work?


Those would both be on Composer canvas (which then might feel bit crowded yes), but depending on mode (view or edit) only half of those would be visible on the actual app.

The structure would look something like this:

Container (edit mode)
    Dropdown 1
    Dropdown 2
Container (view mode)
    Dropdown look-a-like 1
    Dropdown look-a-like 2

Then Container (edit mode) visible property (can be found under in properties bar advanced section) would be true if user was editing and Container (view mode) would be visible in opposite cases.