Export (0) Print
Expand All
1 out of 3 rated this helpful - Rate this topic

Form Element (List)

Windows SharePoint Services 3

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.

<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>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.