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 09:52 PM
In the styles definition.
e.g.
width:250px; !important
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 10:16 PM
Hi Morris,
After adding also working only in LIST view, in the form it is not working.
Please advice on this.
Regards,
Swamy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 10:59 PM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2015 11:11 PM
Hmmm.
Choice lists don't seem to style.
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
‎08-06-2024 02:06 AM
like this;
width: 40% !important;