Display forms and the HTML calculated column

Several readers have commented that the HTML calculated column works fine in the list view, but not when displaying a single item.

Single items are displayed in a page called DispForm.aspx. If you want the HTML to render in this page, you need to add the script there too.

Some of you may reply that there is no “Edit page” option in DispForm.aspx. In this case, you need to use the trick described on the CEWP post. This is easy, but note that it is not supported by Microsoft.

Hope this helps!

Advertisements

6 thoughts on “Display forms and the HTML calculated column

  1. Pingback: Using calculated columns to write HTML « Path to SharePoint

  2. Christophe

    thanks very much for this – addressed the HTML display issue for opening the item as advertised!

    however – most calculated columns of this type (first + last etc) replicate existing functinality ie FullName

    Are you aware of a way to HIDE the fields that I dont want to display?

    there is a post here
    http://www.cleverworkarounds.com/2008/03/13/free-mosswss-2007-web-part-hide-controls-via-javascript/
    but it requires SPD/access to the sharepoint server to install.

    Thanks again – great work

    • can actually place the code in a CEWP – works very nicely to hide your nominated fields.

  3. I can’t seem to get the background color displayed on the single form and I’m guessing this is why it won’t show up on the calendar view. It works fine in the List view but not the calendar view. The field shows the text “Holiday ” instead of the color.
    I have read the tutorial on added the CEWP and tried the work around with ?ToolPaneView=2 and it still shows the text above instead of the color. What else can I try?
    Thanks

  4. Michelle – you have at least two options

    1. hide the fields using my reference above – useful if they replicate existing ones (eg First + Last = Full name), and

    2. Get Christophes code working first in the view – then it should work in the form. Remember that CEWP order makes a difference.

    check this URL out for more advice and details – http://www.endusersharepoint.com/?cat=28.

    they use Christophes code, have a fully detailed workup, and have a couple of screencasts showing correct positioning of CEWP etc together .

    Note that I have posted a comment there about having had several attempts to get the code working properly in the calendar view – see http://www.endusersharepoint.com/?p=1522 for actual comments

    good luck – key to web dev is persistence : )

  5. Pingback: SharePoint calendars: color coding, hover effects, etc. « Path to SharePoint

Comments are closed.