MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Exposing a field on a sharepoint form

  Date: Oct 13    Category: MOSS    Views: 1392

I am using SharePoint 2007 Enterprise edition. A coworker came to me
today to find out if you could expose a SharePoint field on a list form.
For example, I have a custom list that has a few fields. It
automatically has an ID number generated by SharePoint. I do not want
to manipulate the field in any way, just be able to view it on the
SharePoint form. How do I go about exposing it as a read-only field?



4 Answers Found

Answer #1    Answered On: Oct 13    

Are you creating a custom form? If so, you can easily output the field
value without using a form field.

If not, there are some creative solutions out there:

Answer #2    Answered On: Oct 13    

Just to view the ID field on any view can be done as follwos:

Go to List settings and click on any view (say "All items") for editing. On the
edit view page
check the box for ID and it will display ID on that particular view.

Also: If you do need to grab the ID and assign it to another custom field for
display, you can do so by creating a simple SP Designer workflow.

Answer #3    Answered On: Oct 13    

You are trying to make the ID field show up on the EditForm.aspx or the
DispForm.aspx? Obviously you can't make the ID show on the NewForm.aspx
because it hasn't been assigned yet.

If you want to do this on DispForm.aspx, for example, go to SPD2007 and
open the DispForm.aspx in Split mode. In the Design view right-click the
default web part and choose Web Part Properties. In the Layout section
select the checkbox to hide the web part. In the Code view put your
cursor immediately after </WebPart></WebPartPages:ListFormWebPart>. In
the menu select Insert-->SharePoint Controls-->Custom List Form...

Select your list, make sure you are using the correct Content Type for
your form (Item is default on Custom Lists) and select the "Display item
form" radio button. Select OK. That inserts a DataFormWebPart.

Go down to the <tr> where you want to insert the ID row and use this
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<td width="400px" valign="top" class="ms-formbody">
<xsl:value-of select="@ID"/>

Save and go. I hope this was what you were looking for...

Answer #4    Answered On: Oct 13    

This is exactly what I was looking for. I am trying to modify the

Didn't find what you were looking for? Find more on Exposing a field on a sharepoint form Or get search suggestion and latest updates.