How can I change the background for readonly fields

  • RFOneVision
    Asked on February 8, 2018 at 5:29 PM

    I would like my readonly fields to have a light grey background so that they do not look like they can be edited.

    Is this possible?

    Jotform Thread 1378523 Screenshot
  • Kevin Support Team Lead
    Replied on February 8, 2018 at 7:52 PM

    Yes, it's possible to achieve that with some CSS code, please inject this one to achieve it: 

    .form-readonly, input[readonly=true]{

        background: lightgrey !important;

    }

    This guide will help you injecting the code to your form: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes 

    I hope this helps. 

  • RFOneVision
    Replied on February 8, 2018 at 8:09 PM

    That's great and works, but I've got some calculated fields that are also readonly that this code doesn't affect.

    Can I get them grey too? An example is the 'Total beds' field above.

    Tks

  • RFOneVision
    Replied on February 8, 2018 at 8:31 PM

    Actually, I notice that even though the calculated fields don't appear greyed-out in the editor, they do when live. So all good.