The Presentation Layer – Forms and Fields

Building Your Interface

In our first lesson, we learned how to use Tables, Relationships, and Fields to construct a data model for the application you want to build. In this second lesson, we'll teach you to use the presentation layer in WorkXpress to construct an interface for your application. In WorkXpress, the presentation layer of an application uses Forms to display Fields.

Forms are the way you present information to your users. Create rich pages and navigation.
Fields are nested in Forms, and let users enter data about Tables.

Forms

First, we'll learn about the fourth Building Block of WorkXpress, Forms. We'll learn how to nest Forms and Fields to create your interface. Below are the Form Types available for you to use in your application.

Form Type Used For
Grid Displaying data from one record
List Displaying data from many records at one time
Tabs Structures that allow you to organize pages that have a lot of content so that only part of the page's content is visible at any one time
ContainerNesting forms, greater control over layout, security
Menu Selection of pages and actions
Calendar Month, Day, Week, Year views
Tree Displaying data in a hierarchical format
Matrix Displaying data that has two dynamic dimensions

Fields

Finally, we'll expand our knowledge of Fields, which we began to discuss in our previous lesson. Below are the different Field Types available in WorkXpress.

Text Numeric Contact & Location Date/Time
Short Text Number Address Date
Long Text (optional Rich Text) Autonumber Telephone Time
HTML Currency Email Date & Time
SSN Website Clock
Multi-date
Checkbox Selection Links Miscellaneous
Checkbox Static List HTML Button Barcode
Dynamic List Image CAPTCHA
Single Select Text & Image Evaluated
Multi Select Text only File attachment
Report Display

What You'll Learn

Prerequisites
After completing this lesson, you should be able to answer these questions:
  • What is a Form?
  • Can Forms be nested?
  • What is the function of a Field in a Form?
  • What are Form and Field Behaviors?
  • What is Form and Field Security?
  • What Form Types are available for you to use?
  • What Field Types are available in WorkXpress?

Forms

Forms exist to organize the presentation of Fields. In WorkXpress, several Form Types are available to organize other Forms or Fields in a variety of formats.

Fields

Fields exist to store and display data about an Item or a Relationship. In WorkXpress, there are many types of Fields to display many different types of data.

Form Nesting

The most fundamental Form Type in WorkXpress is the Page. Every Form you create will be presented to your users from somewhere within a Page.

A Page is part of a class of Form Types that does not contain any Fields directly; instead, a Page contains only other Forms. All Forms may either contain other Forms or they may contain Fields.

The process of adding a Form Type or a Field inside another Form is called nesting. Technically, there's no limit to the number of Forms or Fields you may nest, but you're practically limited by the quality of the resulting interface.

The image below shows an example wherein Form B is nested inside of Form A.

Field Nesting

You'll need to add Fields to your interface to display data. Fields are always nested inside of Forms.

In this first image, we have nested six fields inside a Field Grid (Form B from our example above). Fields Grids and other Form Types are explained later in this lesson.

In this second image, we show three Fields nested inside a List Form (Form C). Nesting Fields inside a List Form actually makes those Fields into column headers for the list that display a range of values for those Fields from your data layer below.

Finally, we take Forms B and C and nest them back into Form A. This final image shows the results of nesting Forms inside other Forms and of Fields nested inside those Forms. As you can see, the basic look of an application's interface begins to emerge.

It's critical for you to understand the idea of nested Forms and Fields before you move on to the next lesson about the Logic Layer.

Mode

A Form's mode defines whether a given interface element can be viewed or edited, or whether saving the interface element will result in the addition of a new Item. There are four modes of behavior for any interface element:

  • Hidden - A hidden element is not visible to the current User (see the next section of the lesson, Security, for more details)
  • View - an element in View mode can only be seen and may not be modified by your users.
  • Edit - A user may enter or modify data using a Form or Field in Edit mode.
  • Add - Upon saving, a Form or Field in Add mode will create a completely new Item and associate any new data with that Item as appropriate.

Security

You may configure security options for any Form that restrict a user's ability to edit or view that Form. Commonly, security is used to hide or reveal Forms to a user based on that user's role in your organization.

Conclusion

To build software with WorkXpress, you must conceptualize your presentation layer; that is, the interface you would like to offer to your users, in order to achieve your development goals. In other words, you must understand how to create the right Forms and Fields to nest together to produce the various pages and navigation elements that will present an effective interface to your users. Continue to think about the following questions as you move on to our next lesson:

What Pages will you need to create? What Forms will you place inside those pages? What Fields will you place inside those Forms?

fields/fields.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024