- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 10:33 AM
I have reviewed quite a number of Community postings on styling Catalog Variables (http://www.servicenowguru.com/system-ui/field-styles-service-catalog-variables/) and can't seem to find anything on styling check boxes. I am creating an onChange Client Script that sets a number of check box fields to true when a drop down menu option is changed. I would like a way to distinguish (other than the check box and the little green line on the side) that these boxes are default, such as highlighting the label for each check box or the wording in the check box. Has anyone had any success with this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 10:46 PM
Try
g_form.getControl('checkbox').parentNode.style.color = 'red'
Replace checkbox with the name of the variable(checkbox)
I hope this helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2015 10:46 PM
Try
g_form.getControl('checkbox').parentNode.style.color = 'red'
Replace checkbox with the name of the variable(checkbox)
I hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 04:23 PM
Hi pradeepksharma ,
I have a custom application in which there are checboxes.I tried the solution with the onLoad client script but it is not working for me.
For creating the checkbox I used the true/False variable.
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.getControl('u_b4_1').parentNode.style.fontWeight = 'bold';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 04:52 PM
Hello SG,
Applicable for scoped apps: in the standard forms UI (eg client scripts, client ui actions) - by default, we block access to the DOM and certain top-level globals (window, document, $ / jquery). You can enable an application-specific property to gain access to the DOM.
You can enable an application-specific property to gain access to the DOM. This provides a good tradeoff by setting a default with best practice guard rails, and allowing a developer to take explicit action to opt out of the best practice.
To opt out of the best practice create the following property in your scope and set it to false. glide.script.block.client.globals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 05:55 PM