The Form Area

 <  Day Day Up  >  

The form area is the main area of the screen. It is in the form area that InfoPath views are created. A view is a visual representation of a form and might be intended to display only part of the source data, or be suited to printing a form, rather than displaying it onscreen.

Adding text to the form area is simply a matter of typing text, intended for such purposes as labels for form controls or explanation for users. The available text can make use of layout aids such as tables, bulleted lists (not to be confused with list controls, which are described in Chapter 4), indent and outdent, and so on. If you have used Microsoft Word to create documents, you should find the basics of laying out text in the form area very familiar.

Behind the scenes, InfoPath creates XSLT files that dynamically combine data from the data source with static text that you have entered to create the functioning view, which you can see in preview mode or fill in when using form-filling mode.

Adding a Layout Table

To assist in laying out, for example, text boxes in tidy columns , you can add a simple layout table. To add a layout table, click the Insert Layout Table button in the Standard toolbar (see Figure 3.2).

Figure 3.2. The Insert Layout Table button.

graphics/03fig02.gif

The number of rows and columns in the layout table can be customized in the Insert Table window that opens.

To learn more about layout tables, see "Table-Based Layout," p. 103 .


Adding Lists

You might want to add a bulleted list or a numbered list to the form area. A numbered list might be used to list, in order, the steps that a user needs to follow to be sure that it is filled in appropriately. To add either type of list, click the corresponding button on the Standard toolbar. The Ctrl+Shift+L keyboard shortcut allows you to create a bulleted list.

LISTS AND LIST FORM CONTROLS

The form template designer can use lists in a form view. Those lists are fixed and cannot, typically, be added to by the end user. List form controls allow the end user to add new list items, which are bound to the form template's data source.


To learn more about list form controls, see "List Form Controls," p. 77 (Chapter 4).


Inserting a Picture

You might want to include a bitmap image in a view ”for example, to display a company logo. Click in the form area where you want the image to be inserted. Then click the Insert Picture button on the Standard toolbar. The Insert Picture window opens, and you can choose an image to insert from files on your local disk or network.

INSERTING PICTURES IN INFOPATH MODES

In design mode, the form template designer can insert a picture as described in this section. To allow the end user to add an image, the form designer uses the picture form control.


Adding a Hyperlink

Adding a hyperlink to an InfoPath view is very straightforward. The simplest way is to type the URL into the form area in design mode, and InfoPath automatically creates a hyperlink. However, you will find that the URL is displayed underlined . If you want to have a situation equivalent to HTML code, such as

 <a href="http://www.w3.org">W3C Home page</a> 

you use the Insert Hyperlink button on the Standard toolbar. The Insert Hyperlink window will open , and you can type in a URL and link text (see Figure 3.3). You can use the Advanced tab of the Insert Hyperlink window to add ToolTip text.

Figure 3.3. Inserting a hyperlink using the Insert Hyperlink window.

graphics/03fig03.gif

If you want the hyperlink to be determined by data in the InfoPath form template's data source, choose the Data Source options to locate the URL and the corresponding text in the data source.

To create a hyperlink to a URL that includes space characters , insert the URL inside paired quotation marks:

 "http://www.SomeDomain.com/A URL with space" 

To create a link to http://www.w3.org but with W3C home page as the link text, you can delete the link and insert a new one or hand-edit one of the XSLT files that make up a form template. Use the Extract Form Files option on the File menu to extract the files. In a simple form template, the desired XSLT file will be view1.xsl . Open the file and edit it so that, say,

 <a href="http://www.w3.org">http://www.w3.org</a> 

is replaced with

 <a href="http://www.w3.org">W3C Home page</a> 

At a suitable time, depending on whether you have other edits to make, open the extracted form template and use Save As on the File menu to save the form template as an .xsn file.

In preview mode or when filling in the form, the user will be able to click the text W3C Home Page and an Internet Explorer window with the appropriate URL will open.

You can allow the user to specify a hyperlink at form-filling time. For example, the user can insert a hyperlink in a rich text box by clicking on the Insert Hyperlink button in the Standard toolbar.

 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

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