Share via


GetForm Method

The GetForm method of the Forms service returns the schema of a form for a specified list based on the name of the list and the URL of the form.

Parameters

listName   A string that contains the internal name of the list.

formUrl   A string that contains the site-relative URL of the form to retrieve (for example, Lists/List_Name/NewForm.aspx).

Return Value

An XML fragment in the following form that contains the URL, type, and Web Part zone ID for the form and that can be assigned to a System.Xml.XmlNode object:

<Form Type="NewForm" Url="NewForm.aspx" WebPartZoneID="Main"
   xmlns="http://schemas.microsoft.com/sharepoint/soap/" />

Example

The following code example displays information about a specified form.

This example requires that a using (C#) or Imports (Visual Basic .NET) directive be included for the System.Xml namespace.

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://Server_Name/[sites/][Site_Name/]_vti_bin/Forms.asmx