In this article I’d like to introduce you to the basics of a step by step approach to publishing your InfoPath forms to SharePoint – it is intended for entry users.
First things first – your environment configuration
Windows Server 2008 SE
Office SharePoint 2007 (SP1)
Microsoft SQL Server 2005 (SP2)
Microsoft Office InfoPath 2007 (Office 2007 SP1)
A quick overview
We are trying to establish here is to create an InfoPath HR form that will opened as a template from a library within a web browser and then submitting to the forms library with the form fields as library columns. The XSN form will be a custom content type.
Let’s start off by configuring our SharePoint list and environment before we get into the InfoPath form. I will ultimately create two form libraries. One will house my XSN and the other is the library I will have all new forms submitted to.
1) Create a new SharePoint site [Site Actions, Create Site]
2) Now we need to create a Form Library to store my source XSN files, I’ve called mine “Source InfoPath Forms”. The reason is to secure my source library and allow a group of authors that can change or create new InfoPath Forms.
3) I’ll create another Forms Library with the same settings above and call it “Human Resources Recruits”.
4) Then configure the “Human Resources Recruits” library settings
a. Open the Human Resources Recruits library click Settings | Form Library Settings
b. Now click on Advanced settings found under General Settings
c. Make sure you change the option to allow management of contents type to Yes. This will allow you to create a library content type from your InfoPath Form.
d. Also make sure your Browser enabled Documents are set to Open as a Web Page. You’ll want your new forms to open in the browser. Remember that InfoPath form services don’t require you end-users to have the InfoPath client installed on their workstations.
5) Before we continue, I’d like to bring your attention to the default columns for the Human Resources Recruits library:
We’ll publish additional columns from InfoPath a little later.
6) Great. We have now created the two libraries and configured SharePoint to get our solution off the ground. Next, we’ll dive into InfoPath. So this is a good time to open up your Microsoft InfoPath 2007 client on your computer.
7) From the “Getting Started” window in InfoPath, click on “Design a Form Template”, then use the “Blank” form template and ensure you tick the “Enable Browser-compatible features only” check box.
InfoPath offers many rich client side features that you can add to your forms. However, we are requesting SharePoint and the Forms server to do its magic and hence, have some features are disabled for the browser functionality.
8) I’ve created a very basic form with a couple of fields that my HR Manager will need to complete for the interview process using the controls. I’ve saved my form as the HRRecruitsTemplate.xsn (download it here if you wish).
9) Now for the publishing part. From InfoPath, click on “Tools”, “Submit Options” and configure the submit options as below:
Before clicking OK, we need to setup a data connection. My Document library is the library I will store all new recruits forms. Now I’m using the InfoPath form to capture the “metatdata” for my library so my filename will be simple as I’m going to use grouping options in SharePoint to configure my library according to my users needs. Ie. A different view for the Senior Manager and another for the Recruitment Officer who completes these forms.
You’ll also notice that my URL to the library
Click “Next” and provide a name for this data source.
Click “Ok” on the “Submit Options” window.
10) Cool – so now we have setup the location to where all submitted forms will go.
11) Now let’s configure some “Form Options” before we publish. Again, click “Tools” on your menu and “Form Options”
12) Under the “Browser” Category, I’ve selected to show my InfoPath Services toolbar on the top of the page as well as the bottom. I also only need “Submit” and “Close” for the purposes of this form. I don’t need save options as I’ve already configured the format of my name when a user submits the form.
13) Next, I’m going to extend some fields that I defined in the form to the SharePoint columns as “Property Promotions”.
You’ll find I’ve added a few fields I’d like to map to SharePoint (you can also do this process when you’re publishing your form later in this article).
14) Finally, we’re ready to publish this form to SharePoint. Click on “File” and “Publish”
We’re now presented with the “Publishing Wizard”. Select “To a SharePoint server with or without InfoPath Forms Services”. Remember earlier, we created another library where i called mine “Source InfoPath Forms”. This is where we going to publish our source to.
Click “Next” and input the location of our SharePoint or InfoPath Forms Services site.
15) I’ve already prepared my SharePoint library to allow “Management of Content types” in an earlier step, so now I have the ability to publish my Form as a Site Content Type. The advantages of this is I have the columns in the SharePoint library as promoted fields – so I can start to get inventive around my grouping and sorting, perhaps some calculations etc. Maybe apply a workflow to the Content Type “HR Recruitment Form” – these options are all available.
16) In the next step of the wizard, we are asked if we want to create this as new or update. Since this is our first version of the form – I recommend “Create a new content type”. Any iterations of the form you can use the “update” function.
Click “Next” and give your content type and “Name” and “Description” and click “Next”.
17) The wizard will request a location and name for the form template. I’m going to keep my XSN templates in the Source location on SharePoint and Here is my location and name: http://marclenferna/sandbox/Source%20InfoPath%20Forms/HRRecruitsTemplate.xsn.
18) (We’re getting close) Next, we have our form Property fields that will be available in SharePoint as columns. You can click “Next” here as we’ve already set them up earlier.
19) Finally a verification screen some our settings:
Click “Publish” – Finally
It will now save your InfoPath XSN file, create the content type, configure our destination library in SharePoint
20) Navigate to our Source InfoPath Forms library. Voila – we have our XSN form. Its not at all needed for our Form Content Type to work but a super place to keep all your forms together.
21) Now back to the “Human Resource Recruits” library. Notice that there is a new form Content Type when you click the drop down arrow next to “New”
Pretty neat huh! Ok – so let’s do some housekeeping and polish this library up.
22) Click “Settings” and “Form Library Settings” and notice a whole new bunch of new Columns available – all from the InfoPath form we published as a Content Type. Remember this is a site content type and can be found along with your other site content types. All CType features and settings apply! So add a workflow associated to this content type is also possible.
23) Back to the Forms Library Settings
I’ll remove the Content Type labelled “Form”, click on Change new button order and default content type; I unchecked Form as a visible content type.
I’ll also modify the “All Documents” view to group according to Interview Date Surname, I’ve added some of the column fields to the view, structured some totalling to get the view similar to the diagram below:
So my library looks like this:
Click the Candidate Recruitment Interview and you presented with our InfoPath web form.
After we submit a form, we get a Thanks popup that essentially means we’re good and our item is captured into the library.
With a bit of data population, you get:
Thats it folks. Oh by the way, you could embed that form in Office Outlook or as an attachment and still have users click the submit button and populate your SharePoint list. So web, email or file share. All works!
Happy SharePointing, Forms Services, InfoPathing :)
Over n Out