Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am creating a custom display form for a SharePoint 2007 Contacts list. Among the fields to be displayed is the OOB Contact Notes field from among the Core Contact fields. When using the default display form that uses WebPartPages:ListFormWebPart, the history of all notes added about this contact is displayed along with the commit time and user. I would also like to display this history in my custom display form.

I generated the default markup for displaying the items in this list using SharePoint Designer 2007 and the markup for the Contact Notes field is as follows:

<xsl:value-of select="@Contact_x0020_Notes" disable-output-escaping="yes"/>

However this only displays one note, and no history information.

How can I recreate the markup used in the ListFormWebPart to show the Contact Notes history? Or alternatively where is the markup located for the ListFormWebPart so I can copy the needed XSL?

share|improve this question
add comment

2 Answers 2

Use this:

<SharePoint:AppendOnlyHistory runat="server" FieldName="Contact_x0020_Notes" ControlMode="Display" ItemId="{@ID}"/>

You won't necessarily need that ItemId.

share|improve this answer
add comment

I don't know if this will solve your problem or not but one thing you could try is to format the value as a List Form Field with a controlmode of "Display"

An example of this with the title field is shown below:

<SharePoint:FormField runat="server" id="ff1{$Pos}" controlmode="Display" fieldname="Title" itemid="{@ID}" __designer:bind="{ddwrt:DataBind('u',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}" />
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.