Search This Blog

Wednesday, December 17, 2014

How to Configure, Publish and use InfoPath 2010 in SharePoint 2010


The main objective of this guide is to configure SharePoint 2010 environment so that 
it could support InfoPath form services and also how to use InfoPath 2010 client software 
to design and publish InfoPath forms to particular SharePoint document library.
Configuring InfoPath services on SharePoint 2010
Check whether the forms service is enabled in the SharePoint top level site.
On Premises SharePoint:
Navigate to the Site Settings -> Site Collection Features (under section 
Site Collection Administration) by clicking on the Site Actions action menu bar of SharePoint site.

Site Action

Once the page is loaded, we need to check whether the feature named “SharePoint Server 
Enterprise Site Collection features” is activated on the site collection, in the listed features 
find the feature “SharePoint Server Enterprise Site Collection features” and make sure the 
Forms Services feature is activated. (If the feature is not activated then Click on the Activate
 button to activate the feature)
SharePoint Enterprise Features
Online SharePoint:
To check “SharePoint Server Enterprise Site Collection features” is activated for online 
SharePoint environment click top level site then -> Sit Actions -> Manage Site Features
manage site features
If the feature is activated then the row will be like below.
Activate Feature
Creating a Forms Library in the SharePoint website
Forms library in SharePoint is like a container to store InfoPath forms. 
The next step is to create a forms library in the SharePoint website where we need to host the 
InfoPath based library. For doing this, 
we need to do the following steps.
Enable feature named “Team Collaboration Lists”:
Check this feature is enabled or not on SharePoint we need to navigate to
 Site Actions -> Site Settings -> Manage Site Features (under section Site Actions)
Find the feature named “Team Collaboration Lists” and click on the Activate button (if not activated) 
to activate the feature.
Activate Feature -2
Once it is activated the message Active will be show next to the button and the button text would be 
changed to “Deactivate”
 Team Collaboration List
Now it is confirmed team collaboration List feature is activated, we need to create a Forms 
Library where we will publish the InfoPath Forms.
For this, click on the More Options under the Site Actions action menu
More Options
This will bring up the form which lists down all the available list templates using which we can 
create new lists, find list template named “Form Library”
Form Library
Enter the desired name for the Forms Library and press create button. Once form library is
 created it will redirect to you standard view of the Forms Library.
Create Form Library
InfoPath 2010 Client Software:
The InfoPath software helps to design, configure and deploy the form to SharePoint site 
or save as a draft locally.
To run software click on 
Start Menu -> All Programs -> Microsoft Office -> Office InfoPath Designer 2010
Run InfoPath Designer
When InfoPath designer is loaded click on New and choose Blank Form the available 
template section (File -> New -> Blank Form)
Blank InfoPath Form
Either double click on the Blank Form or click on the Design Form button which can be found on 
right side of the form.
InfoPath designer will open blank form in Design mode like this:
InfoPath Blank Form
Now we need to design the form, let’s start with the form title, to do this Click on the text named 
“Click to add title” once that text is clicked it removes the existing text and we can enter our desired 
title. Here I enter “Personal Details” as the text, and where ever we need to enter text or some
 control we just need to click on the position where we need to modify and you can see the cursor
 blinking on the place we have clicked.
We can start design form by adding a table on the body section, for that click on the Insert 
Tab and then Custom Table. You can choose the size of table as many numbers of rows and 
columns you want to draw.
Insert Table
After inserting the table my design mode of the form looks like this:
Personal Details-1
Now I click on each column and insert text or control to design my form. So I start with entering the 
form text, here I intend to get the details such as Name, Age and Marital Status.
Personal Details-2
Next step is to insert controls like TextBox and DropDownList so that form could accept details from
 user.
For that we need to click on the column where we need to insert the control and then select the Home 
Tab in Ribbon control.
Home Ribbon
Against Name field we are adding text control
Against Age field we are adding text control
Against Marital Status we are adding drop down list, so that we add user selection of choices.
Once control would be added form will look like this:
Personal Details-3
To view or change the properties and behavior of controls we can always select and
 right click on the control and choose properties.
Text Properties
If you want to add validation on TextBox so that this field cannot be blank. Just click on 
text box properties and on the tick box validation cannot be blank as it is shown in this screen shot.
textBox Validation
For Marital Status drop down list to add choices right click on control and click on properties.
 In list box choices section select Enter Choices manually option then by clicking add button 
you add as many choices you want.
Drop-down list
Publishing the InfoPath to SharePoint library:
Once our InfoPath form design is ready, we can to publish the form to SharePoint server. 
Before publish form to SharePoint save it on local drive for further changes.
For publishing the form to SharePoint Forms library we need to 
click on File -> Publish -> Sharepoint Server:
Publish Form
When you will on the “SharePoint Server” button, It will start a wizard which helps to publish 
the form to SharePoint Library.
Wizard Page 1:
Enter URL of the SharePoint site where the forms library has been created and press next button.
Wizard Page -1
Wizard Page 2:
Next step system will prompt to enter the credential.
Wizard Page 3:
In this page we need to set the options such as “Enable this form to be filled out by using
 a browser” – this helps the form to be used just like web form, so a user who doesn’t 
have InfoPath installed on his PC can submit the details.
Then choose Form Library so that this publishes the content to a specific forms library 
present in the website, choose Site Content Type only if you have Administrative privilege to
 the site and want to reuse the forms template across multiple libraries and sites.
Wizard Page -3
Wizard Page 4:
Select the option update the form template in an existing form library and select 
document library which you created in SharePoint, in my case name form library is InfoPath Forms.
Wizard Page -4
Press Next button.
Wizard Page 5:
This wizard page maps the control fields to the SharePoint list. The form fields which we 
designed on the form can be created as columns to the SharePoint forms list, so we 
can view the information, export the information as bulk in a very similar way we handle in other 
SharePoint lists.
Wizard Page -5
Wizard Page 6:
Add the fields which fields you want to visible in SharePoint List and click next button.
Wizard Page -6
Wizard Page 7:
Check information is right and click on Publish button.
Wizard Page -7
Once the form has successfully published, the wizard will end.
End Wizard
Viewing the InfoPath form online:
Now form is published successfully to SharePoint Library. Navigate to the Forms
 Library and then click on the “Add document” link
InfoPath Form Library

No comments:

Post a Comment