Embedding InfoPath Form in SharePoint Page


  • Add the following line in the <SafeControls> tag of the web.config file of your web application in all servers:

  • <SafeControl Assembly="Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.InfoPath.Server.Controls" TypeName="*" Safe="True" />

  • Open Portal. Under Site Actions, click Site Settings.

  • In the Site Settings page click Web Part Gallery link.

  • In the Web Part Gallery page, click New. We will be redirected to the Web Part Gallery : New Web Parts facility.

  • In the Web Part Gallery : New Web Parts part, check Microsoft.Office.InfoPath.Server.Controls.XmlFormView. Then, click Populate Gallery. We will be redirected again to the Web Part Gallery page where we can verify the inclusion of XmlFormView.webpart.

  • Now open the page where you want to add the infopath form

  • In the Site Actions, click Edit Page. the page will be set to Edit Mode.

  • Click the Add a Web Part link.

  • Check the XmlFormView, normally under miscellaneous section, then click OK. If we will be prompted by an error message of InfoPath, we have nothing to worry. Just click Close.

  • Now, we will modify XmlFormView web part. To do this, click Edit, then Modify Shared Web Part.
    1. Editing Status : Editing

    2. Xsn Location : Please refer to the notations below.
NOTE: The Xsn Location varies on the publishing approach we have employed.
  1. Document library Published form
    If we have published form template directly to a specific Form Library, similar with our case, we can check the location from Site Actions, then Site Settings, then Site Libraries and Lists, then Customize Form Library, then click the corresponding Form Content Type, then Advance Settings, and we will have the URL of our form template. It is http://Server/Form Library Name/forms/template.xsn.

  2. Central Administration Approved form
    If we have published, however, an administrator-approved form template through the Manage Form Template facility, we can check the location from Site Actions, then Site Settings, then Site Content Types, then the corresponding Form Template Name - it is normally under the Microsoft Office InfoPath section, then Advanced Settings, and we will have the URL of our form template.

    It is http://Server /FormServerTemplates/Form Name.xsn.

Comments

Popular posts from this blog

Adding Contact Selector Control to InfoPath form

Adding Validation to a Custom NewForm.aspx in SharePoint & Redirect

How to add to Sub-Sub Menu in SharePoint