mmikkel / IncognitoField-Craft

A PlainText FieldType which can be disabled or hidden.
MIT License
15 stars 0 forks source link

Add readonly options #1

Closed bossanova808 closed 8 years ago

bossanova808 commented 8 years ago

Hi

This field is great, but I need to still be able to select the text in my 'dsabled' field, so I've added a readonly option. I also needed this text to be more visible, so I've styled it accordingly.

Because readonly is an attribute, not a style, I had to use some simple JS to do this. Hope that is ok!

2016-05-13_16-02-03

bossanova808 commented 8 years ago

(That's when selected - I remove the border shadow but still wanted some indication of focus, and I have it a light grey background as a visual indicator of the readonly nature...)

mmikkel commented 8 years ago

Thanks a lot @bossanova808 – merged.