- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:24 AM
Hi,
In email scripts i am directly inheriting the short description of the form as email body, but the format in which short description was written is not the same in the preview of notifications and email received. please help me with this.
i have attached the code and both short description and its preview, please take a look at it.
code---
preview of the body notifications --
short description from the form----
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:29 AM
Hi Manoj ,
I have used below one which worked for me try to replace and see .
var shortDescription = current.short_description.replace(/\n/g, '<br>'); // Replace line breaks with <br>
var emailBody = "Hello,<br><br>";
emailBody += "Short Description: <strong>" + shortDescription + "</strong><br>";
email.setBody(emailBody);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:25 AM
its not short description, its" DESCRIPTION OF THE FORM"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:29 AM
Hi Manoj ,
I have used below one which worked for me try to replace and see .
var shortDescription = current.short_description.replace(/\n/g, '<br>'); // Replace line breaks with <br>
var emailBody = "Hello,<br><br>";
emailBody += "Short Description: <strong>" + shortDescription + "</strong><br>";
email.setBody(emailBody);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:40 AM
Hi Rajeev,
im getting undefined in email body
please take a look at the code too--
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:42 AM
code correction but still undefined is the result.