Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Read Only Fields displaying black

RobDoyle
Giga Guru

I am having an issue atm where I want certain fields to be read only but on the service portal it puts a black background in the field 

It is doing this for me as admin so i don't believe it is an ACL causing it as it should bypass them as admin

This form is from a catalog item all the variables are single line text fields that are prepopulated based off the name entered.

I can only assume it is a style or theme possible causing it.

It is only on the portal end the back end fields are fine once submitted.

2 ACCEPTED SOLUTIONS

@RobDoyle 

open your portal record and check the theme

AnkurBawiskar_0-1745406480868.png

 

Search in the css variables if someone did the change recently by comparing the versions

AnkurBawiskar_1-1745406531324.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

RobDoyle
Giga Guru

@Ankur Bawiskar 

Thank you for your assistance 

I have managed to fix this by 

RobDoyle_0-1745481741257.png

Finding the theme as recommended 


Then creating a new Style Sheet with the below script


input[readonly] {
background-color: #f5f5f5 !important;
color: #000 !important;
border: 1px solid #ccc !important;
box-shadow: none !important;
outline: none !important;
}

 

And adding that to the theme 

This now shows the fields like this 

RobDoyle_1-1745481899420.png

So no longer have the issue with it displaying as black

View solution in original post

5 REPLIES 5

@RobDoyle 

Thank you for marking my response as helpful.

It seems you marked your own response as correct.

Would you mind marking my response as correct as I was able to help you and provide the solution?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader