Form Manager

part of the Dynamic Publishing System by Karl Goldstein
Previous | Top

Overview

Community and service-oriented web sites collect a large amount of information from their members. At each location where information is collected, the development team has to follow a fairly routine process:

To ensure consistency and speed site development, the form manager allows developers to circumvent the need to write custom code and HTML for handling form generation and submission in most situations. All input elements on a form are generated from a structured specification file (analogous to the template specification file) stored in the file system. The specification file includes all information necessary for generating and handling each form element:

The specification is flexible enough to allow a single form submission to act on any number of database tables. Because the form manager is built on the template system, the HTML code for the forms may either be generated automatically by a master form template, or may be stored on an individual basis and customized by a template author without the intervention of the developer. Designers are free to organize and embellish the form in any way they choose, provided they understand the use of a few simple custom markup tags, as used by the template system.

The Form Specification

To implement a form using the form manager, the developer must first write a form specification, which are stored in the server page tree as plain text files with the .form extension. Like the template specification files, the form specifications are XML documents.

The Form Template

The form manager defines a custom markup tag, formtemplate, to embed a form in a template. This tag substitutes for the normal form declaration used in static HTML. It expects a single attribute, SRC, specifying a relative or absolute URL to the relevant form specification. When this tag is encountered in a a template, the form manager takes the following actions:

Form Processing

Once a form is submitted, the form manager handles all routine processing steps, including:

Previous | Top

karlg@arsdigita.com