In Notes/Domino, a Form provides the structure for creating and displaying documents. (You can think of it as a template.) Forms contain fields, which are used to enter and save data (in items) in a Notes document. They also contain any other design elements that a designer has placed on the forms, such as text, tables, images, sections, and actions. For more information on Notes fields, please see the section, “Creating, Modifying, and Troubleshooting Fields,” earlier in this chapter.
A document is loosely linked to a form through the use of the Form field, which contains the name of the form used to create a document. When a document is opened, it is usually rendered through the form named in the Form field. In some cases, a form may be stored in the document, which always causes the form to open with the stored document. It is also possible to use a form formula in a view, which causes documents to be opened with a particular form.
Forms and pages can be confusing for new developers because they seem to share many of the same capabilities. However, pages can only display information. If you want to collect information and save it in a Notes database, you must use a form.
To create a form, follow these steps:
1. | |||
2. | Choose Create, Design, Form, or click the New Form button. | ||
3. | Choose Design, Form Properties to define the form's properties in the Form properties box (the Info tab is displayed first), shown in Figure 4.12. Although many properties are available for a form, the following list describes the most important ones:
Figure 4.12. The Info tab of the Form properties box. | ||
4. | Click the Defaults tab (propeller beanie) to define the advanced properties. The most commonly used ones are described as follows:
| ||
6. | |||
7. | Click the Background tab to define the form's background color and/or graphic. | ||
8. | Click the Header tab to define a form header and height and width properties. | ||
9. | Click the Print tab to define printing properties for the form. | ||
10. | Click the Security tab to define form-level security, including who can read documents created with the form and who can create documents with the form. If the form should be available to users who have been granted only Public Access, click the Available to Public Users check box. | ||
11. | Create and format fields, text, actions, subforms, shared fields, shared actions, layout regions, tables, hotspots, and other design elements on the form. | ||
12. | Save the form. | ||
13. | Test the form to ensure that it works as expected. You can use the Preview in Notes or Preview in Web Browser features, available from the Design menu. |
To modify a form, follow these steps:
1. | In the Designer client, open the database that contains the form that you want to modify. |
2. | |
3. | Double-click the form you want to edit. |
4. |
Because of the vast functionality and complexity of forms, troubleshooting covers a lot of ground. For the sake of brevity, this chapter covers only the most basic problems. The following is a list of common form problems and their resolution.
Form displays no title or title is incorrect— Select Window Title in the Objects tab and enter a formula to compute a window title.
Items that should be hidden are displayed in run mode— Open the Form properties and check the hide-when formulas of the specific objects.
Items that should not be hidden are hidden in run mode— Open the Form properties and check the hide-when formulas of the specific objects.
Forms do not open because of a formula error— Check all computed fields and editable fields with default values.
Fields are not computed properly— Check field formulas and remember that field formulas are computed left to right, top to bottom. Ensure that field formulas are not dependent upon fields after them.
Documents are saved without required data— Use field validation formulas to require user input for specified fields.
Keyword fields are not dynamically repopulated when form values change— Ensure that Refresh Choices on Document Refresh is enabled, as well as Refresh Fields on Keyword Change, which can be found on the Control tab of the Field properties box.
Fields are not inheriting values from existing document— Open the Form properties box and ensure that Formulas Inherit Values from Selected Document is enabled.
Documents are not being saved as response documents— Open the Form properties box and check the Type setting.
Hidden fields are not being published to Web client— Open the Form properties box and ensure that Generate HTML for All Fields is enabled.
Form is being opened in wrong frame— Open the Form properties box and ensure that the proper frameset and frame is set.
Form size and border are not appearing correctly— Open the Form properties box and ensure that the size and border settings are correct.
18.223.149.74