Creating and Customizing an InfoPath Form


You use InfoPath in situations when you need to improve how information is shared or collected in your organization. One of the primary advantages of using InfoPath is that the interface can be made very simple and intuitive for users to add and complete information. An example of a typical InfoPath form is shown in Figure 10-1.

image from book
Figure 10-1

Before a user can complete an InfoPath form, you must start with a form template, which someone using the InfoPath application designs. You then have to publish the template to a location where users can complete the form by adding information. Each time a user completes and saves the form, a new file is created. For example, if you take the example of the weekly status reports described in the introduction of this chapter, a single form template exists that contains all the required and optional fields that the form should contain. This form template would be published to the SharePoint site using a method similar to that described in Chapter 4 for document libraries or Chapter 6 for content types. Each team member would then click the New button on the Library toolbar to open a new instance of the form. Once the form is completed, the team member would save it to the library and create a new form data file. If five members are on a team, then each week five new form data files are created in the library as the team members create their status reports. However, there would only be one form template file for the status reports.

To get started with using InfoPath, you must first create or design a form template. InfoPath has several sample form templates that you can customize to suit your data collection requirements. It’s always a good idea to view the sample form templates to see if any represent the business activity you are trying to support before you start developing a template from scratch. You should also check the Microsoft Office Online template galleries, which you can access directly via the Forms on Office Online link from the application’s Start menu as shown in Figure 10-2.

image from book
Figure 10-2

In the first Try It Out in this section, you open an existing sample template in Design view and modify a field to make it more appropriate for your organization. You can also make modifications to the form to give it a look and feel that is more appropriate for your organization. This may include adding a company logo to the various form views or adopting a color scheme that matches that of other company documents and interfaces. The second Try It Out in this section illustrates how to do this.

Try It Out-Creating an InfoPath Form

image from book

Using a starting point to create a form gives you more time to focus on tailoring the form to fit your needs. In this example, you modify the existing Meeting Agenda form template to include the names of staff members who typically organize your meetings. You also make this a mandatory field because, in your company, every meeting should have an identified meeting organizer. Giving users a list of values rather than a standard text box reduces the amount of time it takes users to complete the form. The list of values also allows you to build special views in the SharePoint library so you can filter them via the meeting organizer. For example, this Try It Out allows for Amanda Murphy to select or create a view that only displays meetings that she organizes.

  1. Open the InfoPath application.

  2. From the Getting Started window, click the Customize a Sample link from the Design a Form action group, as shown in Figure 10-3.

    image from book
    Figure 10-3

  1. Select the Sample – Meeting Agenda template.

  2. From the Form Tasks list on the right-hand side of the window, click the Design This Form link. Your form opens in design mode.

  3. Click to select the Organizer field.

  4. Click the right mouse button and select Change To, and then Drop-Down List Box from the menu as shown in Figure 10-4. Notice that the Organizer field changes from a standard text box to a drop-down list box.

    image from book
    Figure 10-4

  5. Click the right mouse button again and this time select Drop-Down List Box Properties. The Drop-Down List Box Properties dialog box appears, as shown in Figure 10-5.

    image from book
    Figure 10-5

  6. Select the check box for Cannot Be Blank under the Validation and Rules section.

  7. From the List Box Entries section, click the Add button. The Add Choice dialog box appears.

  8. Enter a name for the team organizer. For this example, enter Amanda Murphy in the Value and Display Name fields. By entering the text for the Value field first, it is automatically added to the Display Name field.

  1. Click the OK button. You will now see Amanda Murphy as a value listed in the properties of the field.

  2. Repeat this process by clicking the Add button again and entering another team organizer. In this case, enter Shane Perran as a value for the drop-down list, and then again enter your own name as a value.

  3. Click the Apply button.

  4. Click the OK button.

  5. Select File image from book Save As. You receive a message window advising you that you will need to publish the form template to make it available to other people.

  6. Click the OK button to accept the message and continue.

  7. Save the file on your computer in the location containing the resource files for this chapter. Give the form template a file name of meetingagenda.xsn.

  8. Click the Preview button from the toolbar.

How It Works

Your form opens in preview mode, as shown in Figure 10-6.

image from book
Figure 10-6

You now see that the Organizer field is a drop-down list box featuring the names you had entered in the previous steps.

image from book

Try It Out-Customize the Look and Feel of a Form Template

image from book

In this example, you add your company’s logo to the form template so that it appears whenever users view or print the form. Branding forms and document templates help create a more professional image for your forms and can help customers identify you as a company. Also, it’s good to have a standardized template with a logo for conducting business activities so that people can clearly identify the official company template.

For this example, you make slight look-and-feel changes to the form template. Note that any alterations you make should be reviewed with the appropriate departments - usually communications or marketing. If these departments do not exist in your organization, consider reviewing changes with stakeholders. By allowing others to participate in the design and planning stages, you can increase the probability of solid end-user adoption because you are more likely to directly address their needs and requirements.

  1. Open the form template designed in the previous example called meetingagenda.xsn.

  1. Click the header of the form just to the right of the words “meeting agenda” and click the right mouse button.

  2. Select Split Cells as shown in Figure 10-7. A dialog box appears requesting information on the format you want to create for your table.

    image from book
    Figure 10-7

  3. Enter 2 for the number of columns, keep the value of 1 for number of rows, and click the OK button. The table is reformatted as specified.

  4. Click in the right-hand column of the header. Choose Insert image from book Picture image from book From File, as shown in Figure 10-8. A file selection window appears.

    image from book
    Figure 10-8

  5. Browse to the resource files from this chapter and select companylogo.jpg.

  6. Click the Insert button.

  7. Chose Format image from book Background Color. The View Properties dialog box appears with the General tab selected, as shown in Figure 10-9.

    image from book
    Figure 10-9

  1. Select the color blue and ensure that the check box to Use a Background Picture is not selected.

  2. Click the OK button.

image from book




Beginning SharePoint 2007. Building Team Solutions with MOSS 2007
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 (Programmer to Programmer)
ISBN: 0470124490
EAN: 2147483647
Year: 2007
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net