
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2018 11:27 AM
When I right click on a field on a form and "configure styles"...the setting of background-color:#d9e5ff; This does nothing to the form field itself....it does show and work on the list of forms. How can I get the background of the form field to display a color? Is there something special about it?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2018 11:51 AM
Field styles only apply in lists. You can do this to a field on a form with a client script though. Here is the syntax you would need in your function...
var myField = 'state';
var ctrl = g_form.getControl(myField);
ctrl.style.fontWeight = 'bold';
ctrl.style.backgroundColor = 'lightBlue';
If you're dealing with a reference field you'll need to do it like this...
var myField = 'assignment_group';
var ctrl = $('sys_display.' + g_form.getControl(myField).id);
ctrl.style.fontWeight = 'bold';
ctrl.style.backgroundColor = 'lightBlue';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2019 09:55 AM
Hi,
Field styles only apply in lists like at the priority tab in list view.
You can style form fields using client script though. for further query refer to servicenow docs.
mark helpful if you find it useful.
Thanks
Ankush Jangle.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2019 10:02 AM
Hi,
Field styles only apply on lists.
You can edit fields on a form with a client script.
Mark Helpful
Thanks,
Ankush Jangle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2021 09:38 AM
If I right on fields on form and go to Configure Style and apply the style for that particular field then it is applying on the form field only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2021 03:03 AM
Create 2 entries in the UI style table, one with Value field with the value and one with Value field empty. This will allow styling on both form and list.