HTML calculated field

Discussions about Forms Designer for SharePoint 2010.
Locked
cgrunke
Posts: 2
Joined: Thu Aug 22, 2013

25 Sep 2013

I was wondering if there was a way to display a HTML calculated field as a clickable link. I have a sharepoint column that I formatted to create a HTML link based off of another field. I used the procedure in the following link to accomplish this. http://blog.pathtosharepoint.com/2008/0 ... rite-html/

I then create a Content Editor Web Part and place it below the form. in the HTML section of the CEWP I place this code: http://www.pathtosharepoint.com/Downloa ... v2.1.1.txt

This all works until I switch from the default sharepoint display form to the Sharepoint Forms Designer.

Any suggestions on getting a HTML calculated column to work in Sharepoint Forms Designer? The solution wouldn't necessarily have to use the solution I linked to above. I just wanted to share what I have tried so far.

Thanks in advance.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

26 Sep 2013

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.

cgrunke
Posts: 2
Joined: Thu Aug 22, 2013

26 Sep 2013

Perfect! works exactly how I wanted. Thanks a lot!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests