One of the great things about InfoPath 2007 is that it allows people to design forms that can be opened in an internet browser. This means, if you have a SharePoint intranet, extranet or website, you can publish InfoPath forms to SharePoint and have people open up the forms even if they don’t have InfoPath installed on their computer.
This is good. What would be better would be being able to display a form within a SharePoint page, but it’s not always clear how to go about doing this. There is a very simple way to include an InfoPath form as a part of a SharePoint page and, by the end of this post, you should know it.
The first thing you need to do is make your form available for use. You can do this by going through the publishing wizard and choosing to upload the form as Site Content Type. You’d better also make sure that you’ve enabled the form to be filled out using a web browser. By default, forms created in InfoPath will be set to open up only in InfoPath, so you need to make sure you’ve got the compatibility correct.
Finish going through the rest of the steps of the wizard, putting in the details of the SharePoint site you want to use the form on, and click publish. This will put your form template onto SharePoint so that people can use it.
Once the form is published, the wizard will give you a final screen, which includes a link labelled “Open this form in the browser.” Click this link.
As you might expect, this will open up your web browser of choice and display your newly published form as a webpage. Copy the URL of this page.
Now open up the SharePoint page you want to display the form in. Edit this page as you would any other and choose to add a webpart in the appropriate place. This will open up a dialogue offering you a list of available webparts. Ignore the one that calls itself Form Web Part and instead select the one called Page View Web Part.
When you’ve added this part, you’ll get a little message saying to open the tool pane to add content. So open the tool pane and you will see a text box labelled link.
In this text box, enter the URL of your form.
You’ll probably need to adjust the height and width of the webpart using the appearance options to get the form displaying correctly. But, when you click OK, you’ll have your form displayed as a part of the webpage.
I said it was simple.
When you publish an InfoPath form as Site Content Type, it is displayed as a webpage and the Page Viewer webpart allows you to display a webpage within a SharePoint page.