Approval description is not having line breaks in service now portal approval form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 02:49 AM
Hi all,
Need your help in displaying the description with the line breaks on the approval form.
Since we dont have option of displaying the description on the approval form, we cloned OOB Approval widget and added the below lines in the body HTML template.
Can anyone please help me with what tags need to be added in html to display line breaks in the description of approval form.
Thank you,
Balaram.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 09:08 AM
Hi @Balaram7 ,
I have cloned the approvals widget.
Here is my code snippet.
Without <br> tag
<div ng-if="approval.task.opened_by"><label>${Requestor}</label> {{::approval.task.opened_by}}</div>
With <br> tag.
<div ng-if="approval.task.opened_by"><label>${Requestor}</label> <br> {{::approval.task.opened_by}}</div>
I hope this helps!
Regards,
Hemant
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 03:40 AM
Hi Hemant,
My requirement is that the value we are copying from the description field is not getting populated with the line breaks, instead the description value is getting copied as paragraph.
Please help me to copy the value similarly how it is being displayed on the RITM table as well.
Thank you,
Balaram.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 07:12 AM
Hello, please try adding this to your tag
style="white-space:pre-line"
That should preserve the line breaks. See below article.
Hope this helps
Lisa