Wednesday, April 6, 2011

InfoPath:How to publish an InfoPath 2007 browser form to SharePoint

Learn which actions you have to take both in InfoPath and SharePoint before deploying an InfoPath form template to SharePoint so that it can be opened and/or filled out using a browser.

Problem

You have an InfoPath form template, which you want to open and/or fill it out using a browser.

Solution

There are several actions you have to take both in InfoPath and SharePoint before deploying a form template to SharePoint so that it can be opened and/or filled out using a browser. The solution described in this article is for InfoPath form templates that do not require administrator approval before deployment, that is, they do not contain .NET managed code.

Prerequisites on the Server

  1. Windows SharePoint Services 3.0 must be installed.
  2. Forms Server 2007 must be installed.
  3. InfoPath Forms Services must be activated.
Refer to the SharePoint documentation for guidance on installing and activating InfoPath Forms Services.

Preparing a form template in InfoPath to become a browser-form

An InfoPath form template must be:
  1. Browser-compatible
  2. Browser-enabled
to be able to be displayed in a browser. You can make a form template browser-compatible by specifying compatibility setting, either up-front, when you first create the form template, or later, when you design the form template.
For more information on InfoPath browser-compatible forms, see
  • Introduction to browser-compatible form templates

Setting browser-compatibility up front

When you first open the InfoPath client application you are presented with the Design a Form Template dialog box. You can check the Enable browser-compatible features only checkbox to make an InfoPath form template browser-compatible.
What this means is that the InfoPath designer will only present you with those features of InfoPath that are supported in both the InfoPath editor as well as the browser.
The benefit of choosing this option so early in the design phase is that you will not run the chance of using options that are not available to browser-forms and then have to change your form's design at a later stage because of this.

Figure 1. Enabling browser-compatible features when creating a new form template.
For more information on setting browser-compatibility, see
  • Specify the compatibility settings for a form template
  • Creating InfoPath Form Templates That Work With Forms Services

Setting browser-compatibility afterwards

You can set browser-compatibility after you have designed your form template by going to the Tools menu, and selecting the Form Options menu item to open the Form Options dialog box, and then clicking on the Compatibility category.
If you created a form template that contains features that are incompatible with InfoPath Forms Services, InfoPath will warn you of this and you will have to modify your form template to satisfy the compability requirements for browser-forms. You will have to fix the incompatibilities before proceeding.
If you don't fix the errors, you can still publish the browser-compatible form template to a server running InfoPath Forms Services. However, the form template may not work as intended/desired.
For a list of the features that are and are not supported in browser-forms, see
  • Web browser compatibility in InfoPath Forms Services
  • InfoPath 2007 features that are unavailable in InfoPath Forms Services
  • View server-generated errors and messages in the Design Checker task pane
Tip: Specify browser-compatibility settings up front to avoid having to adjust your form template afterwards.

                                           Figure 2. Enabling browser-compatible features through the Form Options dialog box.

Browser-enabling a form template

Once you have designed your InfoPath form to be browser-compatible and are ready to publish it to SharePoint, you must make it browser-enabled before doing so.
While you can publish a browser-compatible form template to SharePoint without making it browser-enabled, you will not be able to open or fill out this form in a browser until you browser-enable it. This is an important fact to understand.

So how do you browser-enable an InfoPath form template?

Here is where InfoPath and SharePoint have to work together to make it able for you to browser-enable a form:
  1. In InfoPath: Ensure that the form template does not contain any errors reported by the Design Checker.
  2. In SharePoint: Configure InfoPath Forms Services to Allow users to browser-enable form templates (see figure 3).
  3. In InfoPath: Check the Enable this form to be filled out by a browser checkbox when publishing the form template (see figure 4). 

                            Figure 3. Configuring Forms Services in SharePoint Central Administration Application Management
                                               Figure 4. Browser-enabling a form template in the Publishing Wizard.
If you do not configure InfoPath Forms Services before you try to browser-enable a form template, you will be presented with the following message in the Publishing Wizard:
"This form template is browser-compatible, but it cannot be browser-enabled on the selected site."
                           Figure 5. This form template cannot be browser-enabled message in the Publishing Wizard.
 
Warning: If you ignore this message and continue to publish the form template, you will not be able to open or fill out the form using a browser, not even if you configure InfoPath Forms Services after you have published the form template. If you configure Forms Services after you have published a browser-compatible form template, you will have to re-publish the form template from within InfoPath and browser-enable it while re-publishing it.

Note: This was taken from the site http://www.bizsupportonline.net/browserforms/how-to-publish-infoPath-2007-browser-form-to-sharepoint.htm 


 Thanks

1 comment:

  1. Hi Sarath,

    When I try to publish the Infopath form, I do not get the checkbox 'Enable this form to be filled out by using the browser' and the last button 'Adminstrator approved form template'. Any idea why this might be? I am using Infopath 2010 and SharePoint designer 2010.

    Thanks,
    Sudsie

    ReplyDelete

SharePoint - Cannot convert a primitive value to the expected type 'Edm.Double'. See the inner exception for more details If y...

Ad