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, |
|
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. |
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>