Correct way to make a form label bold? (For Service Portal)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 06:20 AM
I have 2 different ways to make a label on a form bold.
- A catalog client script
- And a field style
I am sure I could get it to work for either but the issue is that I do not what object to select to apply the CSS. What I have been trying is:
function onLoad() {
var el = g_form.getControl('add_new_rule_label'); // The name of the label variable
el.style.fontWeight = 'bold';
}
Also with getLabel instead.
Is there a different method I should be using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 06:41 AM
Hi,
Please use below script
g_form.getcontrole (field name).style.fontweight='bold';
Please refer below links also
Hope this helps!
If you have any more questions, please let me know.
If I have answered your question, please mark my response as correct and helpful.
Thanks,
Sriram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 06:41 AM
Hi Ted,
First you need to set the sys_properties glide.ui.escape_text to 'fasle'
then apply the blow line it will work
in Question Field:<font size=4 color='green'><b>Name</i></font>
Refer below thread for more understanding,
Please mark correct and helpful if you find my response worthy based on the impact.
Regards,
Vishakha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 06:51 AM
Hi Ted,
Just want to add here that the methods getControl(), getHelpTextControl(), getElement(), and getFormElement() are deprecated for mobile devices.
Please check below links.
How do I set short_description field your label bold
Mark helpful/correct based on impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2020 07:24 AM
Hello,
You need to write onload() client script. becuase font style is applicable to inside text.
Tried to getlabel but not working.
You can go to client script way as other mentioned.
If answer is helpful please mark correct or helpful!
Thanks,
Pratiksha