- Set up SharePoint libraries
- Design the form template
- Publish form template to SharePoint Content Type
- Configure the form's primary data connection to submit to the SharePoint library
- Secondary Data Connections to receive or submit data to a SharePoint list
If InfoPath Form services are available on your SharePoint server, you have the option to store the form template using Central Administration's managed templates list.
To make the form available using this method it must uploaded to the Managed Templates List, the activated for the required site collection.
In this example I publish the form template to a Content Type, saving the template to the "Form Templates" document library in SharePoint. The content type can then be added to a Forms library or Document Library in SharePoint. When the "New" button is clicked on the SharePoint Document Library, a blank InfoPath form will open (in InfoPath, or the browser depending on form, SharePoint and client settings).
- Create a Document Library to store the form templates. This can be a standard document library. Users of the form template only require read access to the form template to be able to fill out and submit a form. Restricting users acccess to "Read-Only" on the document library containing the form template will prevent any unauthorised access or modifications to the form template.
- Note: Standard Version control and approval workflows can be set up to help manage form templates in this library.
- Create a Form Library to store submitted forms and meta data. Use the standard Forms Library.
- Open InfoPath and Design a Blank Form Template
- From the Controls toolbar, add 2 text boxes to the form.
- Right click on the first text box after and select "Text box properties" -> set the field name to "Description_1".
- Repeat for the second text box, set the field name to "Description_2"
Set up the Primary Data Connection to submit to SharePoint
- From the Tools menu, select "Submit Options..."
- Check "Allow users to submit this form"
- Select "SharePoint Document Library" from the drop-down list
- Press "Add..." to set up the Primary Data connection
- Enter the url of the form library created in the second step.
- Press "Next"
- Press "Finish"
- Press "Ok" to close the Submit Option dialog.
Publish the form template to a SharePoint Content Type
- From the file menu, select "Publish...", you will be prompted to save the form template locally if you have not done so. You are required to do this to be able to publish the form template to SharePoint.
- Select "To a SharePoint server With or Without InfoPath Form Services" when asked where to publish the form template.
- Enter the URL of your SharePoint Server, Example "http://SharePointServer/"
- Select the publish method: "Site Content Type"
Publish Methods for InfoPath form Templates:
-Document Library: The template will be stored and set as the new item template for the specified document library.
- Site Content Type: You will be prompted for the location to store the form template as well as details of the Content type the template is being published to. Publishing a to a content type allows the template to be used in multiple document libraries.
- Administrator Approved Form Template: Allow the template to be published and made available using the Central Administration Managed Templates List.
In this example I will be publishing the form template to a site content type.
- Select "Create a new Content Type"
- Enter a name for the content type
- When asked to specify a location for the form template, enter the URL of the library created in the first step, press Next.
- Press "Add..", and select the "Description_1" field from the list
- Repeat for the second field
- Press "Next"
- Press "Ok" to close
Add and Set the Content Type as the Form Library's Default
- Using the browser, navigate to the SharePoint Form library created in the second step.
- From the "Settings" dropdown menu for the library, select "Forms Library Settings"
- Under the General Setting heading, click "Advanced Settings"
- Select "Yes" to Allow management of content types
- Press OK
- Under the Content Types section of the Library Settings page, select "Add from existing site content types"
- Add the newly created content type from the form library, press OK
- You can either remove the default "Document" content type from the library or set the new content type as the default to allow a blank form to be opened in a browser or InfoPath when the "New" button is pressed on the form library.
When a new form is submitted, it will be submitted to the specified SharePoint form library, with data from the fields in the InfoPath form being mapped to Columns in the library.
Related Articles (SharePoint InfoPath Forms):
InfoPath - Update Existing SharePoint List Item Programmatically Using CAML
How to programmatically update an existing SharePoint list item from an InfoPath form using a CAML query and the lists web service of the SharePoint Site.
Integrate InfoPath Form with SharePoint Workflow
How to integrate InfoPath forms with workflow in SharePoint to give greater control over the functionality and user interface.When an InfoPath form is set up to submit to a SharePoint library, fields in the form can be mapped to columns/fields in the SharePoint library, or a content type which is associated with a document library.
InfoPath Form Content Type & Template Version management
How to manage updated versions of InfoPath form templates when used as Site Content Type.The following article demonstrates how to ensure that an InfoPath form created from an older version of the form template continue to load from the template version which they were created from, while any new form submitted to the library will always use the latest version of the form template.