- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 05:50 AM
Hi All,
I have below requirements regarding styling.
1) I have created a select box type variable in record producer. Now requirement is to show its options/choices as bold in service portal and other UI too. Tried g_form.getcontrol('request_type').style.fontweight = 'bold'; but it seems this is not working on portal as gave me JavaScript error.
eg.service type : choice text one, choice text 2, choice text 3
2) some text in choice option needs to be bold in select box. This should apply in all UIs specially service portal.
service type : choice text one, choice text 2, choice text 3
3) I am setting value in text box, Now I want to set few content from the text to be bold. This is also required on service portal.
tried few options but they are not working.
g_form.setValue('process', '1. Attach'+[code]<b> +'Documentabc'+[/code]</b> +'from the portal ');
g_form.setValue('process', '1. Attach <b>Documentabc </b> from the portal ');
Many Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 06:04 AM
Hi,
getControl() won't work in portal.
I would suggest not to take this requirement.
You can make it bold possibly in native UI but if you use DOM to achieve in portal it won't be best practice.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 06:04 AM
Hi,
getControl() won't work in portal.
I would suggest not to take this requirement.
You can make it bold possibly in native UI but if you use DOM to achieve in portal it won't be best practice.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 06:20 AM
Thank you Ankur for quick response. Is same applicable for point 3 also?
I think we should be able to make some content bold in string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2022 06:28 AM
Yes same for 3rd point.
If my response helped you please mark it correct to close the question so that it benefits future readers as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader