Validating and Processing Form Submissions
Templating System : User Guide
The templating system provides a simple infrastructure for validating
form submissions. The typical life-cycle of a form is as follows:
- The user makes the initial request for a page containing a form.
The code associated with the page creates the form (with the
form create command) and populates it with elements.
- The developer may use the form is_request command to
encapsulate any special initialization (for example, setting a
primary key value for an Add form, or retrieving current
values for an Edit form).
- The formtemplate tag is used to enclose the form
template. This tag is responsible for generating the appropriate
HTML FORM tag in the final output. The formtemplate
tag also embeds a special hidden variable in the form for the
purpose of identifying incoming submissions.
- By default, the formtemplate tag sets the
ACTION attribute of the FORM tag to the
same URL as that of the form itself. The submission is
therefor processed within the framework of the same code that
was used to create the form.
-
templating@arsdigita.com