Field styles in Form view

amaradiswamy
Kilo Sage

Hi All,

I have defined a style by using javascript:condition in the "Value field" of "Field Styles" to set the background color. It was working fine but the style is working only in the LIST view, when i open the form then the field on the form is normal and no background color was applied for that.

Please kindly advice on this?

Thanks & Regards,

swamy

16 REPLIES 16

In the styles definition.



e.g.



width:250px; !important



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hi Morris,


After adding also working only in LIST view, in the form it is not working.



Please advice on this.


Regards,


Swamy


Ahh you're styling a label.


Styles don't apply to the label on forms.



You'll have to use client scripts to manipulate the DOM.


Personally I would just settle for making the background of the input field a color, as what you are asking to do is not technically supported.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hmmm.



Choice lists don't seem to style.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

like this;

 

width: 40% !important;