Creating, Modifying, and Troubleshooting Forms

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.

Creating Forms

To create a form, follow these steps:

1.
In the Designer client, open the database in which you want to create the form.

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:

  • Enter a name and alias for the form in the Name field. It is a good practice to get in the habit of always entering an alias for each form because this is the value that the system uses to reference the form.

  • Choose the type of document the form will create in the Type field: Document, Response, or Response-to-Response.

  • If the form is to be the default form for the database (used when a form is not specified in the Form field), click the Default Database Form check box.

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:

  • If you want the fields on the form to inherit values from the currently selected document, click the Formulas Inherit Values from Selected Document check box.

  • If you want to have the form open in edit mode (saving the user the trouble of an additional click), click the Automatically Enable Edit Mode check box.

  • If you have hidden fields in the form that you want to publish to the Web (these fields are generated through the use of the <INPUT> tag with the type=hidden attribute), click the Generate HTML for All Fields check box.

If the Generate HTML for All Fields option is not checked, hidden fields on the form are hidden on the Web and do not appear in the HTML source of the page.


6.
Click the Launch tab to define the launch properties. Be sure to set the Frameset and Frame properties if you want the form to always open with a particular frame.

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.

Modifying Forms

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.
Click Forms in the Design Pane to see the list of existing forms in the database.

3.
Double-click the form you want to edit.

4.
Follow the steps outlined in the preceding section, “Creating Forms.”

Troubleshooting Forms

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.149.74