Form Template

SharePoint 2007

An ASCX-based control template that combines multiple controls into a nested structure. Each template can be used to richly extend list item forms.

Real World Example

The content categorization working group determines that all document libraries in the SharePoint environment should present warning information about the categorization of content that is contained in each document when the document is displayed in edit or view forms. A developer creates a custom form template ASCX page to override the default template controls with a new custom control that determines and displays warning information depending on the configured categorization settings of the applicable document library.

Technical Details

The ASP.NET control templates, defined in DefaultTemplates.ascx, determine the layout of SharePoint Products and Technologies list item forms. These templates can nest controls that in turn use more control templates for form layout definition. The controls can contain HTML markup and Web controls, but not data-bound statements involving <%#...%> syntax. To override a default control template globally on a front-end Web server, a custom ASCX file can be added to the control templates directory with a control template ID that matches the existing ID in DefaultTemplates.ascx.

The control templates can be found in the following path:

%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES

Form templates can also be created and referred to in list types or content types as from a list definition schema or from a content types feature definition.

Support Details

You must reset Internet Information Services to make the changes to the available form templates.

Community Additions