Add a User

part of a tutorial on the Dynamic Publishing System by Karl Goldstein

This lesson introduces the form manager component of the publishing system, which generates templated forms and handles validation and database transactions for form submissions. The objective of this lesson is to create a simple form to add a user to the list of sample users. Subsequent lessons will expand on this example to illustrate other features of the form manager.

Create the form specification

A form specification is a simple XML document that uses a standard set of tags to describe a form and its individual elements.

Create a file named user-add.form in a test directory of your server and enter the following specification:

As this example shows, a form specification consists of some general properties followed by any number of form elements. In particular pleas note:

Create the form template

To embed the form into any page using a standard form template, you can use the formtemplate tag to autogenerate the form using a standard sitewide template:

View the form
karlg@arsdigita.com