Set Rich Text Value in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 12:58 AM
Hi Everyone,
I want to use client script to modify the rich text value in the Rich Text lanel type. Does anyone know how to implement it?
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2022 03:54 AM
This is probably not an issue anymore, but you can use the g_form.setLabelOf('<field>','<value>') to achieve what you want to do.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 12:49 PM
Hi,
Can you are more about this and demonstrate how you have this working for a rich text label as mentioned in the author's question. I don't believe this actually works and I wanted to double-check since you're saying it is and replying with this on a few different posts.
Thanks!
Please mark reply as Helpful, if applicable.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 02:21 AM
Sure! I've created a simple catalog item with 2 variables and a onChange catalog client script for this purpose. This is created on a new Rome instance I spun up an hour ago.
sImg URL is an empty input field and the Rich text label contains some dummy text.
The client script reacts to changes to the img url field and changes the label of the rich text label to print the img url and the image within a blue border.
Here's the form in Service Portal before anything has been input
Here's the form after i pasted a link to an image of my birthday dog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 08:07 AM
This method will work in Service Portal but not classic Service Catalog UI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2024 01:01 PM
service portal is where its at anyways.... sweet!!