- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2019 11:35 AM
Hi,
We recently modified our Incident form description field to html. This is working well in the platform, however, our portal description now displays the html code when viewing the ticket form. The widget "ticket fields updated" only renders plain text. I'm not sure how to get the widget to display correctly. Any help or guidance is very much appreciated.
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2019 12:04 AM
It's not enough to modify the Server Script by including the name of HTML field ("u_description_2" in your case) in the list of displayed fields:
var fields = $sp.getFields(gr, 'number,state,short_description,u_description_2,sys_created_on,watch_list');
You have to modify the Body HTML Template of the widget by including the line like the following
<sp-html-content ng-switch-when="html" model="::field.value" />
near the line number 23.
The corresponding fragment of HTML code will look:
<dd class= "col-md-6 col-sm-12 col-xs-6 break-word"
ng-repeat-end ng-switch="field.type"
ng-if="field.value && (field.type != 'decimal' || field.type == 'decimal' && field.value != 0)">
<sp-html-content ng-switch-when="html" model="::field.value" />
<div ng-switch-when="glide_date_time" title="{{field.display_value}}">
<sn-time-ago timestamp="::field.value" />
</div>
<div ng-switch-default >{{field.display_value}}</div>
</dd>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2019 10:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2021 09:25 AM
This worked for me
<div ng-if="task.text"><br>
<ng-bind-html ng-bind-html="task.text.display_value"></ng-bind-html></div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2021 01:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 02:01 AM
Thank you! It is useful for me.