Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Help and How-to
Search
Search
 
Check for updates: (c) Microsoft
Microsoft Update
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Top tips for InfoPath
 
Applies to
Microsoft Office InfoPath® 2003 Service Pack 1 or later

Top tips for InfoPath

InfoPath makes it easy to collect data in electronic forms and then reuse that data in other software programs, systems, or business processes. InfoPath forms can range from simple forms that are used by members of a small team to more elaborate forms that are used by all employees in an organization.

This article offers time-saving tips for working with InfoPath, including tips for designing, filling out, and developing forms.



Light bulb image

Tips for laying out forms


  • When you design a new, blank form, consider placing form controls inside layout tables to provide structure for your form. Look for predesigned layout tables in the Layout task pane.
  • Before you begin designing a new form, try sketching the design on paper first. By refining your ideas early, you can save time when you design the form in InfoPath later.
  • If you're new to form design, be sure to review the sample forms that come with InfoPath for helpful ideas. To open a sample form, click Customize a Sample in the Design a Form task pane.
  • Color schemes affect only certain parts of a form, including heading styles and the borders and cells in repeating tables. If your form does not include these items, you won't see a visual change when you apply a color scheme.
  • If you want to turn a paper form into an InfoPath form, you can use repeating controls to create a more efficient, streamlined design. For example, in a paper expense report form, you might have a table with multiple empty rows for collecting expense items. In an InfoPath form, you can save space by using a repeating table, which enables users to add only as many rows as necessary.
  • If you don't like the default width at which repeating sections and other layout controls are inserted on your form, you can specify a custom layout width in the View Properties dialog box.
  • To add a picture to the background of your form, open the View Properties dialog box, select the Use a background picture check box, and then double-click the picture that you want in the Add a background picture dialog box.
  • On occasion, the text inside a control may not be aligned properly with the surrounding label text. This is especially noticeable when you remove the border from a control. To automatically realign the text, open the Properties dialog box for the control, click Align on the Size tab, and then click Apply.
  • If your form design is too long or complex, you can move parts of your form into different views and let users choose the view they prefer. To create custom views, use the Views task pane. You can then use a rule to automatically switch views when users open or submit your form, or when they click a button.
  • You can change the font and font size of all the text boxes in your form at once. To do this, set a text box to the font and font size that you want, right-click the text box, and then on the shortcut menu, click Apply Font to All Text Box Controls.
  • To see what your form will look like when it's filled out, click Sample Data on the View menu.

Light bulb image

Tips for working with controls


  • If you expect users to work with large amounts of data on your form — for example, with multiple records in a database — you can use a master/detail control to make it easier for them to manage that data. When a user selects an item in a master control, related information about that item appears in a detail control.
  • To change the size for several controls at once, select the controls whose size you want to change. On the Format menu, click Properties, and then make the necessary adjustments on the Size tab.
  • You can use the Controls task pane to add ink picture controls to your form. Tablet PC users can draw inside these controls with their tablet pen, and the ink is saved with the form.
  • You can use a picture in the background of an ink picture control so that users can draw directly on top of the picture with their tablet pen. For example, in an insurance claim form, an insurance adjuster can circle areas of damage on a picture of a car.
  • If you want users to be able to insert multiple table rows when filling out a form, use a repeating table. For example, you can create a repeating table that lets users add as many expense items as they want in an expense report.
  • To change the column order of a repeating table, right-click the table, click Change Binding, and follow the steps in the wizard.
  • Do you want to use vertical column headings in a repeating table? Open the Controls task pane, and then click Vertical Label in the list of controls.
  • Use rich text box controls when you design a form to allow users to enter formatted text, paragraph breaks, images, tables, and bulleted and numbered lists into the form when they fill it out.
  • To allow users to attach files to the form they are filling out, insert a file attachment control on your form. You can then limit the types of files they can attach, if necessary.
  • If part of your form does not always need to be filled out, you can put it in an optional section. Optional sections can be inserted or deleted by users when they fill out the form.
  • If you want to remind users to enter information into a specific control on your form, select the Cannot be blank check box in the control's Properties dialog box. When users fill out your form, a red asterisk appears inside the required field.
  • If you use a text box to display a calculated value, consider making that text box read-only so that users can't accidentally change or delete the value.
  • If you base the choices in a list box on values in the form, the choices change as the user adds information to the form.
  • You can filter data on a form by using list box controls with repeating tables or repeating sections. For example, if your form shows customer data in a repeating table, you can include a list box that allows users to filter customers by city.
  • You can use filters to create cascading list boxes, which show different choices based on the user's selection in another list box.
  • You can use conditional formatting to hide a control based on a value entered into another control. For example, you can hide a text box for a driver's license number if the user enters an inappropriate age into another control on the form.
  • You can use data validation to create data entry patterns, which let you define how users enter numbers and text into a control. For example, in a Phone Number field, you can require that users include parentheses around the first three digits they enter.
  • To ensure that the value entered into a control falls within a specified range, create a data validation rule for the control. For example, you can limit an expense report item to less than $500.

Light bulb image

Tips for working with data sources


  • If you design a form based on an XML Schema (.xsd) file or other external data source, and that data source is modified by using a program other than InfoPath, you can use the Convert Main Data Source command on the Tools menu to update your form.
  • To quickly check whether the controls on your form are bound correctly to fields and groups in the data source, rest the mouse pointer over the control. A binding icon will appear, along with the name of the field or group to which the control is bound and a short description of any potential problem.
  • It's easy to create a list box or drop-down list box that looks up values in a dynamic data source, such as a database or Web service. Use the Properties dialog box to connect an existing list box to a data source.
  • If you create meaningful names for the fields and groups in the data source, it's much easier to design your form. To change the name of a field or group, right-click the field or group in the Data Source task pane, and then click Properties on the shortcut menu.
  • If you design a form based on a database, Web service, or other existing data source, you can quickly create controls by dragging fields and groups from the Data Source task pane onto the form.

Light bulb image

Tips for submitting forms


  • After a user submits a form, you can create a rule in order to leave the form open, close the form, or create a new form.
  • You can design a form that users can submit to a form library on a Microsoft Windows® SharePoint® Services site. This makes it easy for team members to work with multiple forms from a common location.
  • You can design a form that users can submit in a Microsoft Office Outlook® 2003 e-mail message. When enabling form submission, you can specify the recipients, the subject, and other message options.

Light bulb image

Tips for testing forms


  • To quickly test a form's appearance and behavior in the preview window, press ALT+P. To close the window and return to design mode, press ALT+C.
  • When you preview your form, remember that you can do more than just view it — you can take on the role of your users and add additional instances of repeating controls, type data into controls, and test any data validation, conditional formatting, or rules that you set up.
  • To test user roles, point to Preview Form on the File menu, click With User Role, and then select the role you want to use.
  • In the preview window, you can test any script you added to your form. For example, if you added script to a button so that it performs a calculation when clicked, you can click the button in the preview window to make sure that it works properly.

Light bulb image

Tips for protecting forms


  • User roles are a great way to present alternative views or behavior to different sets of users, but they shouldn't be used to restrict access to sensitive data in a form. Even if you make a form read-only or hide certain controls based on user roles, users can potentially use a text-editing program to view or modify the form (.xml) file.
  • To discourage users from modifying the design of your form, open the Form Options dialog box, and then select the Enable protection check box.
  • You can turn off specific commands and options in the Form Options dialog box that allow users to save, print, send, or export a form that they filled out.
  • As a form designer, you can enable digital signatures for the entire form or for specific parts of the form. Users can then add a digital signature by clicking Digital Signatures on the Standard toolbar.
  • If you digitally sign a form template, you can set the security level for the form template to Full Trust, so that the form can access files and settings on the user's computer or on a different domain.

Light bulb image

Tips for publishing forms


  • You can publish and store related forms in form libraries on a SharePoint Services site. To do this, on the File menu, click Publish, and then follow the steps in the wizard.
  • Before you publish a form to a shared folder, make sure that your users have write permissions to the shared folder so that they can fill out the form and save it back to the folder.
  • When you make changes to a published form template, you should verify that the changes you make don't introduce errors into existing forms (.xml files) based on that form template. To preview an existing form with its modified form template, point to Preview Form on the File menu, click With Data File, and then open an existing form.
  • To distribute a form template to your users in an e-mail message, save or publish the form, and then click Send Form as Attachment on the File menu.

Light bulb image

Tips for printing forms


  • To design a print-friendly version of your form, create a new view, copy your form's controls into that new view, and then specify custom printing options for the new view, such as page margins or form footers, in the View Properties dialog box.
  • To insert a page break into your form, click Page Break on the Insert menu. To see how the page break will affect your form when it's printed, click Print Preview on the Standard toolbar.
  • To quickly see how wide your printed page is — and whether the content on the form will fit on the page — click Page Width Guide on the View menu.
  • To make the current date print in the header or footer of a form, click Header and Footer on the View menu. In the Header Format or Footer Format dialog boxes, type &d in the appropriate box. To see how the date will appear when it's printed, click Print Preview on the Standard toolbar.
  • To make page numbers print in the footer of a form, click Header and Footer on the View menu. In the Footer Format dialog box, type Page &p of &P in the Print form with this footer box. When the form is printed, footer text such as "Page 1 of 1" will appear in the lower-left corner of the form.
  • To right-align text in the header or footer of a form, open the Header Format or Footer Format dialog box. In the appropriate box, type &b&b<text>, where <text> is the text you want to appear in the form's header or footer.
  • To center text in the header or footer of a form, open the Header Format or Footer Format dialog box. In the appropriate box, type &b<text>&b, where <text> is the text you want to appear in the form's header or footer.
  • You cannot use the document title variable (&w) in the header or footer of a form, even though Document Title appears as an option in the Insert AutoText list. To work around this issue, type the title text directly in the Print form with this header or Print form with this footer box.
  • To delete an existing header or footer, delete the text in the Print form with this header or Print form with this footer box, and then, press SPACEBAR. The space you added will not show in the printed form, and you will have successfully deleted the header or footer text.
  • InfoPath doesn't print background colors or pictures by default. To turn on background printing, select the Print background colors and background pictures check box in the Options dialog box.
  • You can use the Add Print View for Word Wizard to design and designate print views of your form for use in Microsoft Office Word 2003. To do this, you must create an XSLT file. For more information, see the Microsoft Office InfoPath 2003 Software Development Kit (SDK).

Light bulb image

Tips for filling out forms


  • If a red asterisk appears inside a field on your form, you may have forgotten to type something in the field. To remove the red asterisk, enter the necessary information, and then press the TAB key.
  • If a dashed red border appears around a field on your form, you may have inadvertently entered the wrong type of data into that field. To see a short description of the problem, right-click the field.
  • When you click the calendar icon in a date picker field, a small calendar appears in which you can select dates. To quickly switch years, click the current year at the top of the calendar, click one of the arrows to select the right year, and then select a date.
  • When you're filling out a form, you can use the Send to Mail Recipient command to share your form with others, even if they don't have InfoPath installed on their computer. The recipient will receive a read-only copy of the form in the body of an e-mail message.
  • InfoPath makes it easy to export data from your form to a Microsoft Office Excel 2003 worksheet or to a Web page. To export data, use the Export To commands on the File menu.
  • Unlike Web-based forms, InfoPath lets you to work on your form offline. Once you're back online, you can submit the finished form to the appropriate place.
  • When you're filling out a form, you can open a new, blank form based on the form that is currently open. To do this, on the Standard toolbar, click Fill Out a Form. The new, blank form will open in a new window.
  • If you collect status reports from your employees, the InfoPath Status Report sample form can help you gather that information in a consistent, organized fashion. To access the sample form, click Sample Forms in the Fill Out a Form dialog box.
  • If you're using a Tablet PC, InfoPath automatically starts in ink entry mode so that you can write directly on the form with a tablet pen. If you want to type on a keyboard instead, you can turn off ink entry mode. To do so, clear the Always start InfoPath in ink entry mode check box in the Options dialog box.
  • When filling out a form with a tablet pen, you can wait for InfoPath to convert the ink into text after a 3-second delay. If you want to change the timing, you can do so on the Ink tab in the Options dialog box.
  • When you fill out a form with a tablet pen, remember that your handwriting can be both taller and wider than the field itself.
  • You don't have to have Microsoft Office 2003 installed on your computer in order to fill out a form in InfoPath. However, you must have Microsoft Office Outlook 2003 and Microsoft Office Excel 2003 installed on your computer in order to use the Send to Mail Recipient and Export To Microsoft Office Excel commands.

Light bulb image

Tips for developing forms


  • The Microsoft Office InfoPath 2003 Software Development Kit (SDK) contains sample forms, tools, code libraries, and documentation to assist you with InfoPath form development. To download the SDK, refer to the See Also box at the top of this article.
  • By downloading the Microsoft Office InfoPath 2003 Toolkit for Visual Studio® .NET, you can use a combination of InfoPath for form design and Microsoft Visual Studio .NET for writing and debugging form code. To download the toolkit, refer to the See Also box at the top of this article.
  • By default, InfoPath uses Microsoft JScript® as the default scripting language for a form. To use Microsoft Visual Basic® Scripting Edition (VBScript) instead, open the Options dialog box, click the Design tab, and then make the necessary changes.
  • To debug script in a form, use a programming debug statement in your code. In JScript, use the debugger; statement; in VBScript, use the Stop statement. After you add a debug statement in your code, save the code and preview your form.
  • To use script debugging, clear the Disable script debugging check box on the Advanced tab in the Internet Options dialog box in Microsoft Internet Explorer.
  • Are you planning to develop a custom Microsoft ActiveX® control for your form? If so, be sure to identify that control as both safe for initialization and safe for scripting so that InfoPath can open it.
  • To manually edit the XML files that make up an InfoPath form, save the form as a set of separate files by clicking Extract Form Files on the File menu.
  • By extracting the form files that make up a form, you can access the XML Schema (.xsd) file that InfoPath creates when you design a new, blank form. You can then use the .xsd file to work with XML data in other Microsoft Office 2003 programs.
advertisement