Forms Design

By Steve Kern

IN THIS CHAPTER

  • Designing Forms
  • Setting Form Properties
  • Working with Text Properties
  • Working with Fields
  • Writing Formulas in Fields

This chapter introduces one of the basic design elements of Domino applications. Forms are how documents are added, edited, and viewed in Notes databases.

Although it can be argued that you can create a database with an outline and some pages, in general, all databases need to have at least one form and one view. Forms are the mechanism by which data gets into Notes databases, and fields store data in documents. Fields are the basic building blocks of a Notes form; they can be edited, computed, hidden, or displayed. A Notes form can contain multiple fields. Without a form and a view, you cannot display, enter, or modify data.

A form is similar to a page, in that you can present content to a user . However, only in a form can you affect the contents ”pages are fixed and cannot contain fields. Forms can also contain static text, tables, graphics, actions, hotspots, and other objects. Each form must have a name , contain fields, and have a background color. The default background color is white, but you can change it through the Form properties box, discussed later in this chapter. Forms can be very simple, consisting of a few fields, to very complex, consisting of many fields with complex formulas, LotusScript, JavaScript, and complex actions. Table 4.1 describes the different objects that can be placed on a Notes form.

NOTE

Technically, data is stored as items in a Notes document, and items are displayed and entered via fields. However, the term fields is used throughout this book. Although the term items is technically correct, the term fields is commonly used and is therefore far less confusing.

 

Table 4.1. Notes Form Objects

Object Usage
Static text Text can be used in field labels, titles, subtitles , and descriptive text.
Graphics Graphics make forms more attractive and are sometimes used to indicate status of document. A particular graphic might indicate that a document is locked, while a different image might indicate that it is unlocked. Hotspots are often created using graphic images.
Tables Tables are used to align graphics, fields, and text. Table borders can be selectively hidden by position or for the entire table. They come in several styles. Table cells can be colored individually, and tables can now exist within tables. Tables can also be tabbed or programmed.
Hotspots Hotspots can link to Notes documents and Web pages, provide pop-up help, or execute Notes formulas or script.
Buttons Pushbuttons are special types of hotspots that can be added in specific locations on forms to execute simple actions, Notes formulas, or script.
Actions, shared actions Actions can exist on the menu, on the Action bar as an Action bar button, or in both places. These are available both for forms and views. Notes formulas, @Commands, JavaScript, and LotusScript can be used. Actions help automate a Notes application. Shared actions were introduced in Release 5.
Subforms Subforms are a shared design resource that can be inserted into forms by formula or permanently. Subforms are just like forms and usually contain a set of common fields or actions that can be reused in other forms.
Sections Two types of sections exist: access-controlled and standard. Sections provide a way to present, organize, and control information.
Layout regions Layout regions are special areas on forms that enable the designer to create forms that more easily combine text and graphics. Layout regions can be set to display in 3D format and are often used to gather information in a dialog box.
Computed text You can use formulas to compute text elements on forms.
Image resources Image resources, new to Release 5, are reusable design elements stored in a database. Image resources can be BMPs, GIFs, or JPGs.
Embedded elements The following objects can be embedded: outlines, views, navigators, date pickers, group schedulers , folder panes, embedded editors, and file upload controls.
HTML HTML can be added directly to forms as pass-thru HTML for display in Web browsers.
Java applets Java applets can be embedded directly on Notes forms.
JavaScript JavaScript can be directly embedded on forms, just like HTML.
JavaScript libraries JavaScript libraries, stored under Shared Code, Script Libraries, can be added to forms and called by JavaScript in other events on the form.
Horizontal rules These are Web elements that draw a horizontal line on the page when viewed by a Web client. Properties can be set for horizontal rules.
Fields Fields are the basic elements of data capture, storage, and display on forms.
Shared fields Shared fields are stored under Shared Code and can be reused on multiple forms.
Image maps Image maps are graphic objects containing one or more hotspots that have been programmed.
Layers Layers are new design objects in Designer 6. Layers can be used to position content on forms, subforms, and pages. Layers can be transparent or opaque , and they can be overlapped .
Attachments File attachments can be added to a form.
CSS style sheets Cascading Style Sheets (CSS) are stored under Shared Resources. You use style sheets to control the formatting of content on HTML pages.
OLE objects OLE (object linking and embedding) can be used in forms to link to objects created in other applications.

You can think of a form as a window into a document. Although a document in a Domino database is similar to a record in a relational database table, it is by no means the same. For example, you can add fields to or subtract them from a document, whereas you cannot remove fields from a record in a relational data table. The fields in a relational data table's record are fixed by the table that defines it. Sometimes you will create a form that collects and displays data. And sometimes you might need to create a form that displays only data ”a special "window" into the document in a different format than that used to collect the data. For example, you might create a special form used to print documents.

TIP

If you do create a special print form or a similar form used only to display data in documents, it is a good idea to make all the fields display-only. You can also create a view with a form formula that specifies the print form so that the users don't have to continually choose View, Switch Form from the menu. Whenever they open a document from the view, the form specified in the form formula will display the document.


Part I. Introduction to Release 6

Whats New in Release 6?

The Release 6 Object Store

The Integrated Development Environment

Part II. Foundations of Application Design

Forms Design

Advanced Form Design

Designing Views

Using Shared Resources in Domino Applications

Using the Page Designer

Creating Outlines

Adding Framesets to Domino Applications

Automating Your Application with Agents

Part III. Programming Domino Applications

Using the Formula Language

Real-World Examples Using the Formula Language

Writing LotusScript for Domino Applications

Real-World LotusScript Examples

Writing JavaScript for Domino Applications

Real-World JavaScript Examples

Writing Java for Domino Applications

Real-World Java Examples

Enhancing Domino Applications for the Web

Part IV. Advanced Design Topics

Accessing Data with XML

Accessing Data with DECS and DCRs

Security and Domino Applications

Creating Workflow Applications

Analyzing Domino Applications

Part V. Appendices

Appendix A. HTML Reference

Appendix B. Domino URL Reference





Lotus Notes and Domino 6 Development
Lotus Notes and Domino 6 Development (2nd Edition)
ISBN: 0672325020
EAN: 2147483647
Year: 2005
Pages: 288
Similar book on Amazon

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