Question

Good Morning,

I have a SharePoint site that I've been trying to fix up for awhile. I haven't had problems adding fields into the NewForm.aspx and EditForm.aspx, but Dispform.aspx seems like a whole different problem.

I've been using SharePoint Designer, and it looks as if all the other fields are displayed using this:

<xsl:value-of select="@Priority"/>

But when I go ahead and follow the same format to try to insert a new field, it continues to pull up empty values when I'm positive something should be there.

SHORT: How can I add fields to display on DispForm.aspx?

Any help would be GREATLY appreciated, I'm so stuck!

Thanks, E

SOLUTION:

I had forgotten to add my new columns under the Content Type of the List I was using. Thanks for the help!

Was it helpful?

Solution

Your approach is okey, couple of things to check:

1) Each Data View Web Part has the DataFields tag, it looks like this:

<DataFields>@URL,URL;@Comments,Notes;@Color,Color;@Image,Image;</DataFields>

and it contains the names of your fields. Make sure your new field is displayed in this list.

2) Also there is difference between internal field name and field name. In the example above Comments is internal name but name is Notes. So to display Notes field correctly you should use:

<xsl:value-of select="@Comments"/>

3) Make sure you are trying to output this value in the right place of XSLT template. The easiest way to find the place is to look for existing fields and just add the new one along these.

Hope it helps...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top