How to split field message in two lines in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 01:05 PM
Hi All,
I need to split the field message into two lines.
textMsg = msg.replace(/\{0\}/g, "Mobile Phone: "+result.mobile_phone1).replace(/\{1\}/g, "Business Phone: "+result.phone);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 09:53 PM
Hi @Jagen Chinnapul I am assuming you want to textMsg to be split in to two lines, adding "\n" as shown below should do the trick
textMsg = msg.replace(/\{0\}/g, "Mobile Phone: "+result.mobile_phone1 + "\n").replace(/\{1\}/g, "Business Phone: "+result.phone);
hope that helped
--
Bala Guthy
Please mark this as a solution or click helpful as appropriate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 12:25 AM
it is not clear what your code example should represent.
The only thing I know, is that field messages don't allow HTML, and thus you cannot force a line break within them.
Maik