Manage administrator-approved form templates (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010

Form templates have different administrator requirements depending on the way they use code and connect to data.

Many form templates in InfoPath Forms Services in Microsoft SharePoint Server 2010 can be uploaded by users without being individually approved by an administrator. These form templates are called “user form templates.”

Form templates that contain business logic driven by managed code, access data from external resources, or use data connections that are managed by an administrator must be granted trust to execute code and access data. This trust comes in two forms:

  • Sandboxed solutions enable users to upload form templates with code or data connections in environments without full trust. Sandboxed solutions make connections and execute code in a limited environment, without needing individual approval by administrators, and they cannot include code that requires full trust, such as impersonating accounts by using administrator-level privileges. The level of trust for sandboxed solutions is configured in advance by the administrator.

    For more information about how to manage sandboxed solutions for forms, see Sandboxed solutions overview (SharePoint Server 2010).

  • Administrator-approved form templates are individually verified, uploaded, and activated by an administrator with full trust to the domain. Administrator-approved form templates contain code that requires full trust. Administrator-approved form templates are maintained in a special document library that can be accessed only by administrators.

Because of the potential for security, performance, and manageability issues, it is important that administrator-approved form templates are thoroughly reviewed by an administrator before uploading.

Server farm administrators verify and upload form templates, after which site administrators can activate and manage form templates on the site collections that they own. Form templates that have been activated to a site collection can be managed from the site collection settings page and the document libraries in which they are stored.

Server farm administrators can also activate or deactivate form templates. Form templates can be removed, which stops any forms that are based on that template from being completed. Administrators can also quiesce form templates before they remove them, which allows current form sessions to be completed before the form template is removed.

On the Manage Form Templates page in the Central Administration Web site, you can view a list of all existing administrator-approved form templates in the server farm. You can manage form templates on this page, or you can manage them by using Windows PowerShell. As the server farm administrator, the form designer will typically design and deliver a form template that is ready to be uploaded.

In this article:

  • Deploy administrator-approved form templates

  • Upgrade administrator-approved form templates

  • Modify the category of a form template

Deploy administrator-approved form templates

To deploy an administrator-approved form template, you must complete three actions after the form template has been designed: verify, upload, and activate. These steps can either be performed through the command-line interface or through the Central Administration site. You can upload a form template by using the Publishing Wizard in the InfoPath program, using the command line on a server running InfoPath Forms Services in the farm to which the form template will be deployed, or by using the Central Administration interface. As the farm administrator, you typically receive from the form designer a form template that is already prepared for deployment.

In this section:

  • Upload and verify administrator-approved form templates

  • Activate administrator-approved form templates

Upload and verify administrator-approved form templates

The first step in deploying an administrator-approved template is to upload it to the centrally managed forms library on the Central Administration site.

Note

Form template verification, which is an optional step in the deployment process, checks that the form template is acceptable and can be uploaded to the server. This step should be performed by the administrator prior to deployment to verify that a solution is valid. If you do not verify the form template manually, it will be automatically verified during the upload process. Manual verification will return both messages and errors, but automatic verification will only return errors, if any.

To upload and verify an administrator-approved form template by using the Central Administration site

  1. Verify that you have the following administrative credentials: You must be the farm administrator.

  2. On the Quick Launch of the Central Administration Web site, click General Applications Settings.

  3. On the General Applications Settings page, in the InfoPath Forms Services section, click Upload form template.

  4. On the Upload Form Template page, in the Upload Form Template section, click Browse.

  5. In the Choose File to Upload window, select the template that you want to verify, and then click Open.

  6. Click Verify to check the form template for problems. If there are problems with the form template, they will be displayed in the Report Details section of the Form Verification Report.

    If the verification process returns errors, the form designer can correct the errors and messages and provide you with an updated form template. Then you can repeat the previous steps. If there were no errors and no unacceptable messages, you can continue with the upload or upgrade.

    Note

    If the system warns you that the form template already exists, you can remove the template and then repeat the procedure to upload the form template.

  7. Click OK to return to the Upload Form Template page. When you return to the Upload Form Template page after you verify a form template, you must browse for the template again.

  8. On the Upload Form Template page, in the Upload Form Template section, click Browse.

  9. In the Choose File window, select the template you want to upload, and then click Open.

  10. In the Upgrade section, choose how you want InfoPath Forms Services in SharePoint Server 2010 to behave if another version of the form template already exists on the server.

    • If a previous version of the form template does not exist on the server, or if you do not want to upgrade the existing version of the form template to the new version automatically, clear the Upgrade the form template if it already exists check box. By default, this box is selected.

    • After you upgrade the form template, new sessions start using the upgraded version of the form template. Forms that are already open will continue to use the current version of the form template. If you want existing browser-based form-filling sessions to continue to use the previous version of the form template, leave Allow existing browser-based form filling sessions to complete using the current version of the form template selected. Otherwise, select Terminate existing browser-based form filling sessions.

      Important

      If you select this choice, any data in existing sessions is lost.

    • To wait until all sessions of the form template have been completed before upgrading, open the Manage Form Templates page, click the form template, and then click Quiesce Form Template. For more information about quiescing form templates, see the Quiesce administrator-approved form templates section later in this article.

  11. Click Upload. The upload process can take a few minutes to finish, particularly in a server farm with multiple front-end Web servers. You can check the status of the upload on the Manage Form Templates page.

To upload and verify an administrator-approved form template by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. To verify an administrator-approved form template, type the following command:

    Test-SPInfoPathFormTemplate -Path "<FullPathName>"
    

    Where <FullPathName> is the full path and name of the administrator-approved form template to verify.

  6. To upload the administrator-approved form template, type the following command:

    Install-SPInfoPathFormTemplate -Path "<FullPathName>"
    

    Where <FullPathName> is the full path and name of the administrator-approved form template to upload.

For more information, see Test-SPInfoPathFormTemplate and Install-SPInfoPathFormTemplate.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Although the administrator-approved form template has been uploaded to the central forms library, it is not yet available to users. It must be activated by the administrator of the site collection or by a server farm administrator who also has administration privileges to the site collection.

Activate administrator-approved form templates

To make an administrator-approved form template available to users, the form template must be activated to a site collection. Form templates can be activated to a site collection from the site collection features page by a site collection administrator. A form template can also be activated to a site collection from the Central Administration site by a server farm administrator who has administrator privileges to that site collection. A form template can be activated to more than one site collection; repeat the activation process for each site collection to which you want to activate the form.

Note

Before you activate a form template that uses data connections, ensure that the data connections are configured appropriately.

Note

InfoPath Forms Services in SharePoint Server 2010 is not supported for site collections based on the Basic Meeting Workspace template. If you activate a form template to a basic meeting workspace, the activation will appear to succeed, but the form template will not be accessible from the site collection. Form templates that are available for activation by site collection administrators will appear in the site collection features list. However, if you attempt to activate a form template to the site collection or to activate the Office SharePoint Server Enterprise feature, which enables InfoPath Forms Services in SharePoint Server 2010, you see an error message that reads Required Feature: One or more features must be turned on before this feature can be activated.

To activate an administrator-approved form template to a site collection from the Central Administration site

  1. Verify that you have the following administrative credentials: You must be the farm administrator and the site collection administrator.

  2. On the Quick Launch of the Central Administration Web site, click General Applications Settings.

  3. On the General Applications Settings page, in the InfoPath Forms Services section, click Manage form templates.

  4. On the Manage Form Templates page, click the name of the form template that you want to activate, and then click Activate to a Site Collection.

  5. To activate the form template to the current site collection, click OK. The form template is now available to users.

    • To choose a different site collection, in the Activation Location section, click the site collection box, and then click Change Site Collection. The Select Site Collection dialog box appears.

    • Click the URL of the site collection to which you want to activate the form template, and then click OK. If the site collection you want is on a different Web application, click the Web Application box, click Change Web Application, and then click the name of the Web application. Then click the appropriate site collection and click OK.

The form template is now available for users to access.

To activate a form template to a site collection from the Site collection features page

  1. Verify that you have the following administrative credentials: You must be the site collection administrator.

  2. In a Web browser, open the site collection home page.

  3. In the top navigation bar, click the Site Actions menu, and then click Site Settings.

  4. On the Site Settings page, in the Site Actions section, click Manage site collection features.

  5. Activate the form template to the current site collection by finding the form template in the features list and clicking Activate.

The form template is now available for site collection users to access.

To activate an administrator-approved form template by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: You must be the site collection administrator and have the SharePoint_Shell_Access role on the content database. For more information, see Add-SPShellAdmin and Get-SPContentDatabase.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Enable-SPInfoPathFormTemplate -Identity "<FormTemplateName>" -Site "<SiteCollectionURL>"
    

    Where:

    • <FormTemplateName> is name of the administrator-approved form template.

    • <SiteCollectionURL> is the URL of the site collection where you want to activate the administrator-approved template.

For more information, see Enable-SPInfoPathFormTemplate.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

To verify that the form template is available

  1. On the home page of the site collection that contains the active template, on the Site Actions menu, click View All Site Content.

  2. On the All Site Content page, in the Document Libraries section, click the Form Templates document library. The template that you made available appears in the Form Templates list.

Upgrade administrator-approved form templates

Each administrator-approved form template is identified by its embedded uniform resource name (URN). When a form template is being uploaded, the system verifies whether the URN is already registered. If the URN is not registered, the form template is added as a new form template. If the URN is registered, the system behaves as follows:

  • Earlier Version: If the incoming version is earlier than the existing version, the following error message is displayed: "There is already a more recent version of this form template on the server. Either remove the existing form template from the server or increase the version of the new form template and try again."

  • Same Version: If the incoming version is the same version number as the existing version, the following error is displayed: "A form template with the same version is already on the server. This may be the same form template, or you might have to increase the version of the form template and try again."

  • New Version: If the incoming version is a newer version than the existing version and version upgrade has been requested by the user, the administrator can choose one of several options for upgrading the form template.

When you upgrade a form template, you have four options for how to handle existing sessions to the current form template:

  • Allow existing browser-based form-filling sessions to finish using the current version of the form template.

  • Terminate existing browser-based form filling sessions. Users must begin new form-filling sessions with the upgraded form template. This approach is useful if a form template contains a serious bug or security issue, and you want to make the form template unavailable immediately.

  • Perform a gradual upgrade, in which you upload the new version as a separate form template and eventually remove the old version when it is no longer being accessed by users. This is a useful approach when your form template can be accessed as an embedded form or through a link on a Web page, and you are not concerned about the possibility of the old version being accessed during the upgrade process. With both form templates available on InfoPath Forms Services, you can modify the link to the form template on your Web page.

  • Quiesce the form template before you upgrade to the new version. When you quiesce a form template, you gradually make a transition to a form template from an active state to an inactive state. This upgrade method allows users to finish their current form-filling sessions but prevents new sessions from being started. This upgrade method is useful when you want to ensure that a form template cannot be accessed after a given time.

Note

Before you upgrade an administrator-approved form template, make sure that you have adequately reviewed the new template and checked for problems that might affect security and correct operation of the form.

In this section:

  • Quiesce administrator-approved form templates

  • Deactivate administrator-approved form templates

  • Delete administrator-approved form templates

Quiesce administrator-approved form templates

In a production environment, updating an administrator-approved form template requires more than replacing the old template with the new one. It is possible that users will have active form-filling sessions open. You might want to control the upgrade process to allow active sessions to finish before making a form template unavailable. By using the quiesce function, you can deactivate and manage a form template immediately without affecting existing form sessions.

To quiesce an administrator-approved form template by using Central Administration

  1. Verify that you have the following administrative credentials: You must be the farm administrator.

  2. On the Quick Launch of the Central Administration Web site, click General Applications Settings.

  3. On the General Applications Settings page, in the InfoPath Forms Services section, click Manage form templates.

    Note

    Form templates that are available to users are designated as Ready in the Status column.

  4. Click the name of the form template, and then click Quiesce Form Template.

  5. In the Quiesce section, type the number of minutes to quiesce form sessions before form templates are completely deactivated. On a production system, you should quiesce the form for at least as long as the session state is configured for the server. By default, session state is configured for 240 minutes.

  6. Click Start Quiescing. In the Quiesce section, the status changes to Quiescing.

  7. To verify that your form has successfully quiesced, check the status on the Manage Form Templates page.

    Note

    In the Status column, the form templates that you have quiesced will be designated as Quiesced.

  8. Any time after the form template is quiesced, you can upload a new version of the form.

To quiesce an administrator-approved form template by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Stop-SPInfoPathFormTemplate -Identity "<FormTemplateName>"
    

    Where <FormTemplateName> is the name of the form template to quiesce.

For more information, see Stop-SPInfoPathFormTemplate.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Deactivate administrator-approved form templates

You can deactivate an administrator-approved form template from a site collection. This removes the form template from any document library in the site collection. Any existing form-filling sessions are terminated and all data currently entered into open forms that are rendered from this form template is lost. If you want to allow existing sessions to finish before you deactivate the form template, you can quiesce the form template. For more information, see the Quiesce administrator-approved form templates section earlier in this article.

To deactivate an administrator-approved form template from a site collection

  1. Verify that you have the following administrative credentials: You must be the farm administrator and the site collection administrator.

  2. On the Quick Launch of the Central Administration Web site, click General Applications Settings.

  3. On the General Applications Settings page, in the InfoPath Forms Services section, click Manage form templates.

  4. On the Manage Form Templates page, click the name of the form template that you want to deactivate, and then click Deactivate from a Site Collection.

  5. To deactivate the form template from the current site collection, click OK. The form template is now unavailable to users.

  6. To choose a different site collection, in the Deactivation Location section, click the Site Collection box, and then click Change Site Collection. The Select Site Collection dialog box appears.

  7. Click the URL of the site collection from which you want to deactivate the form template, and then click OK. If the site collection that you want is on a different Web application, click the Web Application box, click Change Web Application, and click the name of the Web application. Click the appropriate site collection, and then click OK.

To deactivate a form template by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: You must be the site collection administrator and have the SharePoint_Shell_Access role on the content database. For more information, see Add-SPShellAdmin and Get-SPContentDatabase.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Disable-SPInfoPathFormTemplate -Identity "<FormTemplateName>" -Site "<SiteCollectionURL>"
    

    Where:

    • <FormTemplateName> is the name of the form template to deactivate.

    • <SiteCollectionURL> is the URL of the site collection that contains the form template to deactivate.

For more information, see Disable-SPInfoPathFormTemplate.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Delete administrator-approved form templates

You can delete an administrator-approved form template from the entire server farm. When you delete a form template from the Manage Forms Template page, it is no longer available in any site collection.

To delete an administrator-approved form template by using Central Administration

  1. Verify that you have the following administrative credentials: You must be the farm administrator.

  2. On the Quick Launch of the Central Administration Web site, click General Applications Settings.

  3. On the General Applications Settings page, in the InfoPath Forms Services section, click Manage form templates.

  4. On the Manage Form Templates page, click the name of the form template that you want to delete, and then click Remove Form.

  5. On the Remove Form Template page, click Remove.

To delete an administrator-approved form template by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Uninstall-SPInfoPathFormTemplate -Identity "<FormTemplateName>"
    

    Where <FormTemplateName> is the name of the form template to delete.

For more information, see Uninstall-SPInfoPathFormTemplate.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Modify the category of a form template

Every form template that was uploaded to the server, whether by an administrator or by a user, has a Category property. This optional property logically groups form templates according to user-defined values. When a category is defined for form templates in a library, you can use the list view By Category to view the contents of the library grouped according to the value of the Category property. You can edit this property for templates that exist in the following locations:

  • The central administrator-approved form template library on the Manage Form Templates page.

  • A document library to which the form template has been activated or uploaded.

    Note

    When you change the values of properties such as Category and content type for an administrator-approved form template in the main form template library, the action is limited to that specific form template, and to form templates activated to a site collection after the value was set. Form templates that have already been activated to a site collection are unaffected by property changes that are performed on the original form template. Likewise, changing a property value on a form template that exists in a site collection forms library does not affect the original form template in the main administrator-approved form template library. Additionally, if a form template is upgraded by an administrator, and the upgraded version is then activated to a site collection, any property changes previously performed on the existing site collection form template are overwritten by the new version's current property value.

To modify the category of an administrator-approved form template by using Central Administration

  1. Verify that you have the following administrative credentials: You must be the farm administrator.

  2. On the Quick Launch of the Central Administration Web site, click General Applications Settings.

  3. On the General Applications Settings page, in the InfoPath Forms Services section, click Manage form templates.

  4. On the Manage Form Templates page, click the name of the form template, and then click View Properties.

  5. To assign a category to the form template, in the General Properties section, in the Category name field, type the name of the category, and then click OK.

To modify the category of an administrator-approved form template by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Set-SPInfoPathFormTemplate -Identity "<FormTemplateName>" -Category "<CategoryName>"
    

    Where:

    • <FormTemplateName> is the name of the form template to modify.

    • <CategoryName> is name of the category to apply to the form template.

For more information, see Set-SPInfoPathFormTemplate.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

See Also

Concepts

InfoPath Services cmdlets (SharePoint Server 2010)
InfoPath forms administration (SharePoint Server 2010)