Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
General Reference
Reference
List Schema
A-F
 Form Element
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
Form Element (List)

Describes the forms in a base list type.

<Form
  Path = "Text"
    SetupPath = "Text"
    Template = "Text"
  Type = "DisplayForm" | "EditForm" | "NewForm"
  Url = "URL"
    UseLegacyForm = "TRUE" | "FALSE"
  WebPartZoneID = "Text">
</Form>
Attribute Description

Path

Optional Text. Specifies the file system path, including the leaf name, of the file containing the template used for the list of document libraries that is rendered in a file dialog box. The value of this attribute is relative to the _layouts directory and does not start with a forward slash ("/").

SetupPath

Optional Text. Specifies the relative path to the folder in the setup directory that contains the .aspx page of the form, for example, pages/form.aspx.

Template

Optional Text. Specifies the list template to which the form belongs.

Type

Required Text. Indicates the type of form being described and can be one of the following values: DisplayForm, EditForm, or NewForm.

Url

Required URL. Specifies the path to the ASP.NET file used for the form.

UseLegacyForm

Optional Boolean. Used during upgrade to specify that Windows SharePoint Services use Collaborative Application Markup Language (CAML), as in previous versions of the technology, instead of Web controls, to define the view of an item within a form.

WebPartZoneID

Optional Text. Specifies the zone for the Web Part.

Minimum: 0

Maximum: Unbounded

The following example outlines the forms definition within the Schema.xml file for announcements lists.

Xml
<Forms>
  <Form Type="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main">
    <ListFormOpening>
      ...
    </ListFormOpening>
    <ListFormButtons>
      ...
    </ListFormButtons>
    <ListFormBody>
      ...
    </ListFormBody>
  </Form>
  <Form Type="EditForm" Url="EditForm.aspx" WebPartZoneID="Main">
    <ListFormOpening>
      ...
      .
    </ListFormOpening>
    <ListFormButtons>
      ...
    </ListFormButtons>
    <ListFormBody>
      ...
    </ListFormBody>
    <ListFormClosing>
      ...
    </ListFormClosing>
  </Form>
  <Form Type="NewForm" Url="NewForm.aspx" WebPartZoneID="Main">
    <ListFormOpening>
      ...
    </ListFormOpening>
    <ListFormButtons>
      ...
    </ListFormButtons>
    <ListFormBody>
      ...
    </ListFormBody>
    <ListFormClosing>
      ...
    </ListFormClosing>
  </Form>
</Forms>
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker