Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

Embedding InfoPath Forms Service Forms in SharePoint

with 5 comments

This post has been replaced with this one! This provides a link to a comprehensive document describing this technique.

Question: When using InfoPath Forms with the InfoPath Forms Service the form displayed in the browser replaces the SharePoint Form from which it was launched. Is there a way of embedding the form in an SharePoint page so that users  will not close the browser once they’ve finished with the form and exit from the SharePoint application?

Answer: Yes! Here’s a brief description of the steps to do this. The “XmlFormView” web part can be used to host an InfoPath Server form on a Web Part page within a SharePoint application. This web part is located  in the assembly Microsoft.Office.InfoPath.Server.dll and the web part will need  to be hosted in your site by adding an entry in web.config’s “SafeControls” element.

Once this has been done you can publish an InfoPath template to a SharePoint library and make it available as the template for a form library. Then, create a Web Part page in your site and add an instance of the “XmlFormView” library. Configure this web part to reference the InfoPath template through the “XmlLocation” property.

Finally, you will need to add a “Submit” button on the form as you will need to save the form’s data once the user has completed the form.

Written by Nick Grattan

July 19, 2007 at 8:27 am

Posted in Uncategorized

5 Responses

Subscribe to comments with RSS.

  1. […] InfoPath Forms Published December 19, 2007 SharePoint , SharePoint PowerUser In this earlier post I briefly describe how to embed an InfoPath form in a SharePoint Web Part Page using the […]

  2. […] Using XmlFormView web part […]

  3. Since I am getting an error when submitting the form from an extranet zone and not from the default zone leads me to believe I need to configure something for it to work.

    Has anyone tried to get this working?

  4. I have used XmlFormView Webpart for displaying my infopath form, and customized the webpart with editing and xsnlocation properties… After customization it is giving error “The form has been closed”. can anyone please help me out…

    Thanks in advance…
    Your help will be greatly appreciated…

    Ashwin Bhagwat

    November 5, 2008 at 8:16 am

  5. Like many things Microsoft, this does not work.

    Bryon Lape

    April 29, 2009 at 6:25 pm

Leave a Reply

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

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: