Create a form library

A form library (library: A location on a SharePoint site where a collection of files is managed. The library can display information, including user-defined properties, about each file.) provides a simple way for you to share and track XML-based forms that are used to gather information. For example, you can create a form library for your team's expense report forms.



Overview

A form is based on a template. Imagine that you design an expense report template for your team to use. Each expense report that someone fills out is a form.

The form that people fill out is just an .xml file that contains the data (and only the data) that was entered into the form, such as the expense date and the amount. Everything else that makes up the expense report is provided by the form template. After people fill out forms, you can merge the form data or export it for analysis.

In a form library, you can use the versioning and approval features to manage your forms, just as you manage files in other types of libraries. You can keep track of versions, so that you can view a version history and restore previous versions if necessary. You can also specify that forms remain in a pending state until they are approved or rejected by someone who has permission to do so.

A form library is a convenient way to store your forms in one location, but you can store forms in other types of libraries, such as document libraries. You can use content types to make forms available in other libraries, such as a team document library. Find links to more information about content types in the See Also section.

A form library comes with a placeholder file that you need to replace with your template. To create or customize a template, use an XML-based form design program such as Microsoft Office InfoPath 2007 or an XML editor that is compatible with Windows SharePoint Services 3.0.

When you publish a template to a form library, the columns of the library are based on the columns of the template.

Although form libraries can store other types of files, there are advantages to working with XML files and customizing the template with a compatible program. You can merge data from the forms, and the headings or fields that you specify in the template appear as columns in the form library.

 Note   To create a form library, you must have permission to manage lists on the site on which you want to create the form library.

Top of Page Top of Page

Create a form library

Some XML-based form design programs, such as Office InfoPath 2007, enable you to create a library on a SharePoint site when you publish a form template from the form design program. In most cases, you start by saving a copy of the template and then publishing it to the library. For more information about publishing form templates, see Help in your XML-based form design program or XML editor.

If the form design program creates the library for you, you do not need to follow this procedure to create the library from Windows SharePoint Services 3.0. After the program creates the library for you, you can change any settings that you want in the library on the SharePoint site.

Your form design program may also provide the option to publish a template to an existing library. Use this procedure to create a form library before publishing the template. For example, you may want to create the library, change its settings, and add users and groups to it before publishing the form template.

Click View All Site Content, and then click Create on the All Site Content page.

 Tip   In most cases, you can use the Site Actions menu Menu image instead to complete this step.

  1. Under Libraries, click Form Library.

In the Name box, type a name for the library. The library name is required.

The name appears at the top of the library page, becomes part of the address for the library page, and appears in navigational elements that help users to find and open the library.

In the Description box, type a description of the purpose of the library. The description is optional.

The description appears at the top of the library page, underneath the name of the library. If you plan to enable the library to receive content by e-mail, you can add the e-mail address of the library to its description, so that people can easily find it.

  1. To add a link to this library on the Quick Launch, verify that Yes is selected in the Navigation section.
  1. If an Incoming E-mail section appears, your administrator has enabled your site to receive content by e-mail. If you want people to add forms to the form library by sending them in e-mail messages, click Yes under Enable this document library to receive e-mail. Then, in the E-mail address box, type the first part of the address that you want people to use for the form library.
  2. To create a version each time a file is checked into the form library, in the Document Version History section, click Yes.

You can later choose whether you want to store both major and minor versions and how many versions of each you want to track.

  1. In the Document Template section, select the form template that you want to specify as the type of form for all forms in the library.
  2. Click Create.

 Note   When a user creates a form, it opens by default in a form-editing program that is compatible with Windows SharePoint Services 3.0, if one is installed on the user's hard disk. If no compatible program is installed, the form opens in a browser. You can specify that the form opens in a browser at all times by changing the advanced settings for the library.

Top of Page Top of Page

Edit the form template

Some XML editors or XML-based form design programs that are compatible with Windows SharePoint Services, such as Office InfoPath 2007, edit and publish the form template from the XML editor or form design program.

Some form design programs may require you to edit a local version of the template and then publish it again to the library from the program. For more information about publishing form templates, see Help in your XML-based form design program or XML editor.

Use the following procedure if you do not have a local copy of the template and you need to obtain a copy from the SharePoint site. Depending on your form design program, the template may open as read-only. You may need to save the revised template to your hard disk first, and then republish it.

  1. If the library is not already open, click its name on the Quick Launch.

If the name of your library does not appear, click View All Site Content, and then click the name of your library.

  1. On the Settings menu Settings menu, click Form Library Settings.
  2. Under General Settings, click Advanced settings.
  1. In the Document Template section, under the Template URL box, click Edit Template.
  2. The template will open in an XML editor or an XML-based form design program that is compatible with Windows SharePoint Services, such as Office InfoPath 2007.
  3. Make the changes that you want, and then save the template.

Depending on your form design program, you may need to republish the template to the library on your SharePoint site from your program.

  1. In your SharePoint site, at the bottom of the Form Library Advanced Settings page, click OK.

 Note   If people on your site already filled out forms that were based on the original template, consider how any changes to the template may affect those forms. For example, adding a field that users are required to fill out may cause errors to appear in the original forms that were filled out before the field was added.

Top of Page Top of Page

Specify a custom template

To customize a form template for the form library, use an XML editor or an XML-based form design program that is compatible with Windows SharePoint Services. Your program may recommend that you customize the template and republish it from the program. For example, you would make changes to a local copy of a template in Office InfoPath 2007, and then republish it to the SharePoint site. You would not need to specify the path to a custom template from your SharePoint site. For more information, see Help in your program.

The following procedure shows you how to specify a custom template from your SharePoint site. To specify a custom template, first you must publish or copy your custom template to the Forms folder of the library and then point the library to the location of the template.

  1. If the library is not already open, click its name on the Quick Launch.

If the name of your library does not appear, click View All Site Content, and then click the name of your library.

  1. On the Actions menu Actions menu, click Open with Windows Explorer.
  1. In Windows Explorer, browse to find the custom template that you created.
  1. Right-click the file, and then click Copy on the shortcut menu.
  1. Click the Back button until you return to the library, and then click the Forms folder to open it.
  1. Right-click in a blank area in the folder window, and then click Paste on the shortcut menu.
  1. Close Windows Explorer and return to the library on the site.
  2. On the Settings menu Settings menu, click Form Library Settings.
  3. Under General Settings, click Advanced settings.
  1. In the Document Template section, type the address of the template that you want to use in the Template URL box. The location is the Web address of the template on the SharePoint site, relative to the name of the site. For example, if your template is called Orders.xml, and you add it to the Forms folder of the Shared Documents library, you would type /Shared Documents/Forms/Orders.xml in the Template URL box.

If the settings in the Document Template section are not available, multiple content types may be enabled. To see whether multiple content types are enabled, verify that Yes is selected under Allow management of content types? in the Content Types section. If it is, you must edit the template for the content type, if you have the permission to change the settings for the library.

Top of Page Top of Page

 
 
Applies to:
SharePoint Server 2007, Windows SharePoint Services 3.0