- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2023 04:44 AM
While Copying HTML field to Journal field using Client Script and removing HTML Tags   is still seen?
// Get the HTML field value
var htmlFieldValue = g_form.getValue('html_field');
// Remove HTML tags using a regular expression
var plainTextContent = htmlFieldValue.replace(/<[^>]*>/g, '');
// Set the plain text content to the Journal field
g_form.setValue('journal_field', plainTextContent);
How to remove   which is still seen after copying?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2023 04:54 AM
Can you try below.
/ Get the HTML field value
var htmlFieldValue = g_form.getValue('html_field');
// Remove HTML tags using a regular expression
var plainTextContent = htmlFieldValue.replace(/<[^>]*>/g, '');
//remove  
var plainTextContentis=plainTextContent.replace(/ /g','');
// Set the plain text content to the Journal field
g_form.setValue('journal_field', plainTextContentis);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2023 06:22 AM
Thank you Jaspal,
After removing HTML Tags and   we recieved ; semicolon which we replaced and then got the Correct Solution with below script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2023 04:54 AM
Can you try below.
/ Get the HTML field value
var htmlFieldValue = g_form.getValue('html_field');
// Remove HTML tags using a regular expression
var plainTextContent = htmlFieldValue.replace(/<[^>]*>/g, '');
//remove  
var plainTextContentis=plainTextContent.replace(/ /g','');
// Set the plain text content to the Journal field
g_form.setValue('journal_field', plainTextContentis);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2023 06:22 AM
Thank you Jaspal,
After removing HTML Tags and   we recieved ; semicolon which we replaced and then got the Correct Solution with below script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-18-2023 06:25 AM
Great to know the approach worked. Seems, the suggested answer was not marked correct instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-21-2023 07:16 AM
Done Jaspal