- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 10:43 PM - edited 11-03-2022 10:48 PM
Hi All,
Is anyone knows how to retrieve value from an HTML Type Field. I have a field on form 'long_description' And I want to print only the text from it.
I tried this one current.getValue('long_description'); but it print all the tag.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:15 AM
Updated script. added space between ""(double quote).
var regex = /( |<([^>]+)>)/ig;
var content =current.getValue("long_description").replace(regex, " ");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:18 AM
@Para5 ,
Try the below code:
var regex = /( |<([^>]+)>)/ig;
var content =current.getValue("long_description").replace(regex, " ");
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:09 AM - edited 11-04-2022 12:09 AM
Hi @kamlesh kjmar
Thank for response.
I have added above code. Now this prints only content but the Space is not present between the words.
e.g HiUser but I want link this Hi User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:15 AM
Updated script. added space between ""(double quote).
var regex = /( |<([^>]+)>)/ig;
var content =current.getValue("long_description").replace(regex, " ");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 12:18 AM
@Para5 ,
Try the below code:
var regex = /( |<([^>]+)>)/ig;
var content =current.getValue("long_description").replace(regex, " ");
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh