Lab 3: Publish a Form in InfoPath 2003

 

Microsoft Corporation

April 2004

Applies to:
    Microsoft® Office InfoPath™ 2003
    Microsoft Office Outlook®
    Microsoft SharePoint™ Products and Technologies

Summary: Learn how to publish a form to a SharePoint form library, send a form as an e-mail message attachment, save a form you have filled out back to the form library, and disable design mode for your users. (6 printed pages)

Contents

Scenario
Lab Objective
Setup
Exercises
Conclusion

Download the odc_INF03_Labs.exe sample file.

Scenario

The sales report form that was created in Lab 2 is ready to be shared with sales representatives at Contoso Corporation. To distribute the form, the IT department at Contoso must publish it.

Lab Objective

In this lab you learn how to do the following:

  • Publish a form to a form library.
  • Promote a form's properties in a form library.
  • Distribute a form using an e-mail program.
  • Disable design mode for a form.

Setup

This lab requires that you have Microsoft® Office Outlook® 2003 installed on your computer. Optionally, a second computer with both Outlook 2003 and Microsoft Office InfoPath™ 2003 can be used to provide a more realistic example of how a form is published. However, the two computer configuration is not mandatory, and this lab can be completed with one computer.

You need to have access to a SharePoint site.

Exercises

Exercise 1: Publish a Form to a SharePoint Site

One way to share a form with others in your organization is to publish it to a form library. In the following exercise, you publish the sales report form to a form library created specifically for use by the sales team. Sales representatives can then use this form library to fill out, save, and view sales report forms.

To open the form

  1. Start InfoPath.
  2. In the Fill Out a Form dialog box, click Design a Form.
  3. In the Design a Form task pane, click On My Computer.
  4. In the Open in Design Mode dialog box, locate the folder where you installed the training files, and then double-click the Lab 3 folder.
  5. Select Lab3Template.xsn, and then click Open. The Contoso sales report form opens in design mode.

Now that you have opened the form, you are ready to publish it. As part of the publishing process, specify form library columns.

To publish a form to a form library

  1. On the File menu, click Publish.

  2. On the first page of the Publishing Wizard, click Next.

  3. On the second page of the wizard, click To a SharePoint form library, and then click Next.

  4. On the next page of the wizard, click Create a new form library (recommended), and then click Next.

  5. In the Enter the location of your SharePoint site list, type the name of your SharePoint site, and then click Next.

  6. In the Name box, type Contoso Sales Reports, and then click Next.

  7. On the next page of the wizard, click Add.

  8. In the Select a Field or Group dialog box, click salesRepresentative.

  9. In the Column name box, replace salesRepresentative with Sales Representative, and then click OK. This text is what appears at the top of the column in the form library.

  10. To complete the wizard, click Finish.

    A page appears indicating that the form was successfully published. This page contains the URL for the form library. If you want to see the form library, select the Open this form from its published location check box, and then click Close.

After you have finished publishing your form to the form library, you can choose to promote additional form data to columns in the form library.

To promote additional form data to a form library

  1. In design mode, on the Tools menu, click Form Options , and then click the Form Library Columns tab.
  2. Click Add, and then, in the Select a Field or Group dialog box, click department.
  3. In the Column name box, replace department with Dept.
  4. Close all open dialog boxes.
  5. To verify that Dept is added as a new column on your form library, save the form, and then, in Microsoft Internet Explorer, browse to the form library.

Exercise 2: Send the Form as an E-mail Message Attachment

In addition to publishing the form on form library, you may also want to deploy it using e-mail.

To send the form as an attachment

  1. On the File menu, click Send Form as Attachment.

    An e-mail message opens in Outlook 2003 with the InfoPath form attached to it.

  2. In the To box, type an e-mail address that you have access to.

    Note   For testing purposes, if you do not have a second computer to use in this exercise, you can send the e-mail message to yourself.

  3. Click Send.

Now that you have sent the form as an attachment in an e-mail message, you need to confirm that it was deployed correctly.

To open the form and fill it out

In this procedure, you are acting as the sales representative who has received the sales report form.

  1. After you receive the e-mail message you sent in the previous procedure, open the message and double-click the attached .xsn file. The Contoso sales report form opens in InfoPath.
  2. Fill out the form, and then, on the File menu, click Save As.
  3. In the Save As dialog box, in the File name box, type the URL for the form library.
  4. Click the form library Contoso Sales Reports, and then click Save.
  5. Close InfoPath.

Exercise 3: Fill out the Published Form Offline

Now that the sales report form is published, the sales representatives at Contoso can use it when they are working with customers. In some cases, sales representatives may need to fill out the form while they are not connected to the company's intranet. The following exercise demonstrates how a sales representative can fill out a form even when they are offline.

To fill out a form while working offline

In this procedure, you are acting as the sales representative who has received the sales report form. To complete this exercise, you must use the computer on which you received the sales report form as an e-mail message attachment.

  1. On the Windows Start menu, click My Network Places.

  2. Under Network Tasks in the My Network Places dialog box, click View network connections.

  3. Right-click the connection that you are using to connect to the Internet, and then, on the shortcut menu click Disable.

    You are now working offline.

  4. Start InfoPath.

  5. Under Form categories in the Fill Out a Form dialog box, click All Forms.

  6. Under All Forms, double-click the form you received as an e-mail message attachment in Exercise 2.

  7. Fill out the form, and then, on the File menu, click Save As.

  8. In the Save As dialog box, in the File name box, type in a file name, and then click Save.

  9. Close InfoPath.

  10. In the Network Connections dialog box, right-click the connection that you were using to connect to the Internet, and then, on the shortcut menu, click Enable.

Even though you temporarily suspended network access to the published form on the SharePoint site, you still can open the form in order to fill it out. This is especially helpful to Contoso sales representatives, because they are frequently unable to connect to the company intranet while traveling.

If you make changes to the sales report form while sales representatives are offline, those changes are updated to the sales representatives' computers the next time they open the form. This ensures that sales representatives are always using the most recent version of the form.

To update a form on a SharePoint site

  1. On the computer you used to publish the form to the SharePoint site, start InfoPath.
  2. In the Fill Out a Form dialog box, click Design a Form.
  3. Under Open a form in design mode in the Design a Form task pane, click the form that you published in Exercise 1.
  4. In the form, select the text Customer Name, and then, on the Formatting toolbar, click the arrow next to the Font Color button and click Green.
  5. Save the form, and then close InfoPath.
  6. On the sales representative's computer, which you used to receive the sales report form in Exercise 2, start InfoPath.
  7. In the Fill Out a Form dialog box, double-click the form you just modified.

Notice that because the form created in Exercise 2 is linked to the copy of the form you just opened, the form can retrieve the published changes.

Exercise 4: Disable Design Mode

When deploying a form to a group of users, by default they can open the form in design mode and make changes to the structure and layout of the form. In this exercise, you learn how to disable this functionality and prevent users from modifying the design of your form.

To disable design mode

  1. Start InfoPath on the computer that you used to publish the form to the SharePoint site.
  2. Under Design a Form in the Fill Out a Form dialog box, click Design a Form.
  3. Under Open a form in design mode in the Design a Form task pane, click the form that you published in Exercise 1.
  4. On the Tools menu, click Form Options.
  5. On the General tab in the Form Options dialog box, select the Enable protection check box, and then click OK.
  6. Save the form, and then close InfoPath.
  7. To test that you disabled design mode for your users, on the sales representative's computer, open the form and verify that Design this Form in the Fill Out a Form dialog box is disabled.

Conclusion

After completing this lab, you can publish a form to a form library, send a form as an e-mail message attachment, save a form you have filled out back to the form library, and disable design mode for your users.