HTML display on form

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Stu
Posts: 23
Joined: Tue May 10, 2016

25 Jun 2016

Hi Guys

I have a column in my list that contains HTML. I would like to have it visable on the form. How would I achieve this?

Do I use the </>HTML and than set the content in the Java script? If this is the case how do you do it?
Or is there an option to have a value treated as HTML as opposed to text?
Thanks

Stu

Stu
Posts: 23
Joined: Tue May 10, 2016

25 Jun 2016

This answer from another Post worked

Hello,

Put your calculated column into the form with Forms Designer. Then put the following code into JS-editor of Forms Designer:

Code: Select all

var text = fd.field('Calc1').control()._el().text();
fd.field('Calc1').control()._el().html(text);
In my example the internal name of the calculated column is 'Calc1', so you have to replace it with your internal name.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests