Read-only inputs

Has anyone found a nice way to set Perspective inputs (textfields, etc.) read-only, like we can in Vision (Behavior > Editable)?

My workaround is to use the enabled property, but it displays a red stop cursor and and the background color is way too dark. And I didn’t find a way to set the css attribute readonly (impossible?) on them either, and it doesn’t seem to be settable via css classes.

I think there’s a nice semantic distinction between read-only and enabled, it would be cool if we had it in Perspective too.

You can modify the appearance of disabled components by way of theming your project.

I obviously don’t know how your project is used or what expectations are where it will be used, but as a user I find read-only inputs to be one of the worst things ever. The only applicable usage I can think of is restricting permissions - at which point the cursor makes sense. I never recommend read-only inputs (outside of boolean representations being displayed by disabled toggle switches or checkboxes), and always instead recommend using whichever applicable display component makes the most sense.

1 Like

Hi, thank you for the feedback.
The thing is I’m creating a lot of forms for Q.A techs to input quality data in different contexts, and instead of re-creating all of those forms with labels only, I’d like to set inputs as read-only when the forms are filled in & saved, for reviewing later.

I’ll modify a theme to make the disabled states less dark, thanks again.

Do not modify themes, create a new one that imports the theme and override the css. If you modify the default css files they will get reverted on an ignition update

3 Likes