Condividi tramite


FormTemplates Schema Overview

Applies to: SharePoint Foundation 2010

Available in SharePoint Online

This schema describes optional XML you can include in a content type as custom information. This XML node must be stored within an XMLDocument element in the content type definition. For more information, see Custom Information in Content Types.

This schema enables you to specify the form templates used to display an item's Display, New, and Edit pages in the Microsoft SharePoint Foundation user interface.

The schema has the following elements:

  • FormTemplates   The root element. The FormTemplates element has the following attribute:

  • Display   Required Text. Specifies the name of the custom Display form template to use.

  • Edit   Required Text. Specifies the name of the custom Edit form template to use.

  • New   Required Text. Specifies the name of the custom New form template to use.

The form templates referenced here are .asmx controls that render the central section of a SharePoint Foundation Web page. That is, the form template renders everything except the SharePoint Foundation frame elements (what is usually termed the chrome) on the page. SharePoint Foundation renders the chrome for the page.

The form template names you specify must be names of rendering templates found within an .ascx file located on the front-end Web server at the following location:

%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES

If you do not include this XML document in your content type definition XML, SharePoint Foundation uses the default values. In that case, SharePoint Foundation renders the forms automatically for you.

Following are the default contents of this XML document is for the Document content type:

<FormTemplates 
xmlns="https://schemas.microsoft.com/sharepoint/v3/contenttype/forms"
<Display>DocumentLibraryForm</Display>
<Edit>DocumentLibraryForm</Edit>
<New>DocumentLibraryForm</New>
</FormTemplates>

Following are the default contents of this XML document for the Item content type:

<FormTemplates 
xmlns="https://schemas.microsoft.com/sharepoint/v3/contenttype/forms"
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>

See Also

Concepts

Introduction to Content Types

Custom Information in Content Types

FormUrls Schema Overview