Deploy an InfoPath 2007 Form with Managed Code to a Browser Enabled Sharepoint Document Library


InfoPath forms can be deployed to a Sharepoint document library, and assuming that the form template has been developed to be browser compatible, the form can be opened in a browser client (either when the user’s machine doesn’t have the InfoPath client or when the Sharepoint document library is configured to open forms by browser only).

Such form templates can usually be published directly to a Sharepoint document library without Administrator intervention, however, when the form template contains managed code the form cannot be published directly to the Sharepoint document library, but has to be first Approved by the Sharepoint Administrator.

The Administrator has to approve the template, upload it and then activate it against 1 or more site collections.

The process begins be publishing the form template as usual, at the screen shown below, select “Enable this form to be filled out using a Browser” and select “Administrator Approved form template”

image

Continue the publish procedure as normal, except that you will be publishing to a network share (or other location) accessible to the Sharepoint Administrator who can then review the form template and approve it.

The Sharepoint Administrator must then;

  1. Upload the template to Sharepoint
  2. Activate it against site collection(s)
  3. Associate the form template with a form library

To Upload the template;

  1. Go to Central Administration for your farm
  2. Select Application Management, from there select InfoPath Forms Services, and then choose Manage Form Templates.
  3. The Form Template library is opened, which is where administrator approved templates for the farm are stored.
  4. Select “Upload Form Template”. Locate and select the saved template file and click the Verify button. You will be shown any errors or warnings related to your template (review them if necessary), and click OK.
  5. Locate your form template again. The Upgrade options exist for you to choose how to upgrade the form template if it already exists.
  6. Click the Upload button to perform the form template upload. It is now available as a Feature to be activated against any site collection in the farm.

To Activate the form template on a Site Collection;

  1. You can activate the form template feature from the Manage Form Templates page of Central Administration, the same page where we just uploaded the template. From the templates context menu, choose Activate to a Site Collection.
  2. In the Location section of the page, choose the relevant Site Collection and click the OK button.

Note, that you may have to change the Web Application location in order to find the right site collection.

To Associate the Form Template with a Form Library;

  1. Create a new form library or use an existing one
  2. Select the library’s advanced settings page and configure the library to allow content-type management
  3. Optionally, you might want to select the “Display as Web-Page” setting
  4. Click OK
  5. From the Content Types section, select “Add from existing site content types”, from the list box displayed locate your form template, click Add then click OK.

If you return to your form library and select New from the library menu, you should see an option there for your form template. If you choose this new option, the form template should be opened in the browser.

Published by

Phil Harding

SharePoint Consultant, Developer, Father, Husband and Climber.

3 thoughts on “Deploy an InfoPath 2007 Form with Managed Code to a Browser Enabled Sharepoint Document Library

  1. Nice post.

    I have attempted to write a small post covering InfoPath deployment, thought sharing here will be good for your readers

    See my blog post where I take you step-by-step with relevant snapshots covering the following:

    a. Converting InfoPath Data Connections to DCL library in SharePoint.

    b. Publishing InfoPath form to a SharePoint List/Library

    c. Creating a .wsp solution package for the InfoPath form and its code-behind

    d. Creating a batch script that will deploy the InfoPath form on your Production site.

    e. Ensuring the InfoPath form has been deployed as a feature

    f. Modify the DCL’s in the production environment.

    g. Associate the InfoPath Content Type with the Document/Forms Library

    See the full blog post at: http://www.sharepointfix.com/2009/12/infopath-2007-form-and-nintex-workflows.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.