Page 1 of 1

HTML display on form

Posted: 25 Jun 2016
by Stu
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

Re: HTML display on form

Posted: 25 Jun 2016
by Stu
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.