3 min read

(For more resources on Microsoft Sharepoint, see here.)

Creating a holiday request InfoPath form and publishing it to a form library

InfoPath forms are capable of containing repeating data, optional fields, and presenting different views to different users. To access the full power of InfoPath, you will want to create a custom form and publish it to a SharePoint form library. In this recipe we learn how to create a holiday request form and publish it to SharePoint.

Getting ready

This recipe works for:

  • SharePoint 2010 Enterprise Edition
  • Office 365 (SharePoint Online)

You will need a SharePoint site where you want to create an InfoPath form. This recipe creates a holiday request form for illustration.

You will need the Design or Full Control permission level to run this recipe.

You will need InfoPath Designer 2010 installed on your client machine.

How to do it…

  1. Open the Microsoft InfoPath Designer 2010 on your computer.
  2. The backstage view is displayed. Double click the on SharePoint Form Library button.
  3. A new blank form opens. Change the form title to Holiday Request. Change the first subheading to Employee Details.
  4. Place the cursor on the first Add control cell in the Employee Details table. Click on Text Box in the Controls section of the Home ribbon. A new textbox will be inserted into the form (field1) and a new field is added to the forms data source (Fields view).
  5. Double on click field1 in the Fields view to open the properties dialog. Rename the field to FirstName and click on the OK button.
  6. Repeat steps 4 and 5 to add textboxes for LastName, EmailAddress, and Department.
  7. Add labels to the form for each of the textboxes that you have added.
  8. Highlight the last row in the Employee Details table and delete it.
  9. Rename the next section in the form Holiday Details. Add labels for Start Date and End Date.
  10. Expand the Controls section in the ribbon. Select the Date Picker control. Add date controls for StartDate and EndDate to the form.
  11. Click on the File tab to access the backstage view. Click on the Publish button.
  12. The Publish options are displayed. Click on the SharePoint Server button.
  13. You will be prompted to first save your form template. Enter the filename holidayrequest.xsn and click on the Save button.
  14. The Publishing Wizard will open. Enter the URL of the SharePoint site where you want to publish your form and click on the Next button.
  15. Tick the Enable this form to be filled out using a browser.
  16. Select the Form Library option.
  17. Click on the Next button.
  18. Select the Create a new form library option.
  19. Click on the Next button.
  20. Name the new library Holiday Requests.
  21. Click on the Next button.
  22. To promote data items in the form to SharePoint list columns, click on the Add button.
  23. Select the FirstName column and click on the OK button. Repeat for the LastName, EmailAddress, Department, StartDate, and EndDate fields.
  24. Click on the Publish button.
  25. The form is published to SharePoint. Click on the Open this form in a browser link. The InfoPath form opens in the web browser.
  26. Enter some data to test the form and click on the Save button.
  27. You will be prompted for a filename for your form. Enter request1 and click on Save.
  28. Your holiday request is saved to the form library. Click on the Close button.

LEAVE A REPLY

Please enter your comment!
Please enter your name here