Creating and Publishing InfoPath Forms - Exercise
Creating and Publishing InfoPath Forms
Duration: 15 to 25 minutes.
In this exercise, you will how to create a basic InfoPath form and publish it to a SharePoint site.
- Launch InfoPath Designer 2013.
- Select a template to design an InfoPath form.
- Note in the Available Form Templates page that InfoPath loads at startup that there are a couple of templates designed specifically for SharePoint.
Both of these templates are preformatted with labels and titles.
- Instead of using the preformatted templates, you are going to build a more basic form by selecting the Blank Form template and clicking the
Design Form button to start the process.
- Add text and fields to the new blank form.
- Click the text Click to add title in the form designer window.
- Type the following text in the title area Contact Information.
- Click in the region below the dotted line that the title sits above to place your insertion bar in the upper-left corner.
- Type the following text First Name:, add a space after the ":".
- With your insertion point on the same line with text you just typed, click the Text Box control found on the toolbar inside the Controls
Note that there are several controls to choose from in the Controls list box. This example is intended to be a simple example so
you are only using the Text Box control, but feel free to experiment on your own with other types of controls.
- Drag the sizing handle on the right-hand side of the new text box control that you just added until it looks similar to the following image.
- Click just to the right of the text box control that you just resized to place the insertion point. Type a couple of spaces and then type the following text
Last Name:, adding a space after the ":".
- Click the Text Box control from the Controls area of the toolbar to add another text box control behind the "Last Name:"
text you just entered. Resize the new text box control until your form looks similar to the following image.
- Click behind the second text box control to place your insertion point and press your Enter key twice to move your insertion point to a new line
and add space to line above it.
- Follow the previous steps to add text and a text box control for "Email" and "Phone", each on a separate line. Use the following image as a guide to what your
form should look like at this point.
- Edit the properties of the Text Box controls.
- Right-click the First Name Text Box control and select Text Box Properties... from the context menu.
- In the Text Box Properties dialog window, rename the Field name: from "field1" to "FirstName". Click the OK
button to save your changes.
- Repeat the previous step with each field renaming "field2" to "LastName", "field3" to "Email" and "field4" to "Phone".
- Publish the new form to SharePoint.
- Click the Save icon in the upper-left corner of the InfoPath window.
- In the Save As dialog window, name the file ContactForm.xsn
and save it somewhere on your computer.
- Click the File tab at the top of the InfoPath Designer window.
- Click the Publish button on the Info page.
- Click the SharePoint Server button on the Publish page to start the process of publishing to SharePoint.
- In the Publishing Wizard dialog window, enter your SharePoint site URL, "http://<<your site goes here>>". Click the Next button to continue.
- Leave the default values on the second page of the Publishing Wizard. Click the Next button to continue.
- Leave the default value, Create a new form library selected on the third page of the Publishing Wizard. Click the Next button to continue.
- In the Name field of the Publishing Wizard's fourth page enter "ContactFormLibrary". For the Description field
enter "Sample library for contacts using InfoPath forms". Click the Next button to continue.
- On the next and fifth page of the Publishing Wizard click the Add button next to the first list box under the heading The fields listed below will be available as columns in SharePoint sites and Outlook folders.
- In the Select a Field or Group dialog window, leave the field FirstName selected with the default settings and click the
- Repeat the previous two steps to add the fields LastName and Email. The final list of columns should look like the following
image. Click the Next button to continue.
- Click the Publish button on the sixth page of the Publishing Wizard.
- Click the Close button on the final page of the Publishing Wizard.
- Close Microsoft InfoPath Designer.
- Add a new InfoPath document to the library created by Microsoft InfoPath Designer.
- Go back to your browser window or open a new one if it is not already open.
- Navigate to the site you published the InfoPath form in.
- Click on the new ContactsFormLibrary link in the site's Quick Launch menu.
- Click the
new document link to add a new entry into the library.
- Note that the form that opens in your browser has the fields and layout you defined in InfoPath Designer.
- Enter some data into the fields, for example: "Bart" for the First Name, "Simpson" for the Last Name, "firstname.lastname@example.org" for
the Email and "555-1212" for the Phone. Click the Save button when you are done filling in the fields.
- In the Save As dialog form, enter "Bart" for the File Name field. Click the Save button to complete the process.
- Click the Close button to close the Contact Information form.
- Note that the new document named "Bart" has the three columns, First Name, Last Name, and Email in the library view
because you selected to add those fields as columns when you published the form. The Phone was not selected to be a column in the library but the data
is stored inside the document item.