cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sbonera
Advocate II
Advocate II

entity form convert textarea html to plain text

Hi i have an entity form which has a read only text area , however in the model driven app it is a multi line text area and therefore when viewed on a entity form on a portal it is including the HTML tags. I would like to strip out the html tags

 

 entityform.PNG

I found a similar post on dynamics forum Adxstudio Entity Form: Display field as HTML - Microsoft Dynamics CRM Forum Community Forum   however this appear not to work.

 

I think i am looking at some kind of jquery on the entity form, to get the value of the textarea and replace without the html tags.

 

Any help would be appreciated.

 

 

1 REPLY 1
justinburch
Microsoft
Microsoft

Hi @sbonera,

If you just want to strip the HTML:

var $original = $("#new_multilineschemahere");
var $new = $("<div></div>");
$new.html($original.text());
$original.val($new.text());

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,257)