Field styles in Form view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 08:54 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 01:40 PM
Fuji changed a lot of the CSS formatting, but you can always do this in a client script
for example: This script
will have this result on the form
there are a couple of other community threads you can view as well on scripting options
Re: I want to set the color of text in short description field and choice list field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 09:46 PM
Hi Mitchell,
Thanks for your reply. I am setting the background color to a field if the current time is exactly 15 min before the date and time selected in "Date and time of execution" (future date) field. so can i access glidetime objects in client script. Please advice on this?
Regards,
Swamy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 05:49 PM
Have you tried suffixing !important on the field style make it work on forms?
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 09:42 PM
Hi Morris,
Thanks for your reply.
Where i have to include !important (in value field or styles definition)
Regards,
Swamy