Previous Up Next
Getting Started phpHtmlLib Guide

HTML Forms

How to Use Forms in phpHtmlLib

by Culley Harrelson
© September 2005, Walter A. Boring IV
(phpHtmlLib 2.5.4)

Table of Contents

Overview

phpHtmlLib includes a mature html forms engine that handles, among other things, rendering and validation. There are a number of example forms on the phpHtmlLib web site and you are highly recommended to review these examples. The intention of this tutorial is to explain the phpHtmlLib forms engine without extensively using language specific to phpHtmlLib. If you are looking for detailed information please see the relavant sections of the api reference.

Features

  1. Build a form quickly and easily from over 40 pre-defined form elements.
  2. Data validation is handled automatically depending on the type of form element selected.
  3. Data validation against exteral sources such as a database is performed when the form element validation passes. For example, if you have included a {@see FENumber} form element in your form, the form validator will first require the user to enter a valid number in this field. If you also need to compare the number entered with a number extracted from your database the form validator will perform whatever processing needed for this look up after the basic element validation is complete.
  4. When the data validation process is unsuccessful do to user error the labels of the form elements involved in the problem are highlighted. Additionaly a complete description of all errors is displayed at the top of the form. This error display defaults to a two column table listing the field name and the error that occurred. If more than one error occurs for a given field there will be more than one row for that field. The error display is completely customizable and can be rendered however you like.

Blank Form Template

laundry list of all you can do with the forms

Form Handling

Overview of FormContent basically. How much do we want to talk about FormProcessor? FormElements?

Placing Fields on the Form

element selection handles front end validation. Do we want to detail elements here or put them in another section? Just cover the most common elements?

Default Values for Form Elements

what is going on here

Form Layout

what is going on here

Backend Form Validation

what is going on here

Processing Form Results

what is going on here

Customizing

Various customizations

Form Confirmation Display

How to build a customized confirmation display

Form Errors Display

How to build a customized error display

Multiple forms on 1 page

This section will discuss what is necessary for multiple forms on the same page.

Previous Up Next
Getting Started phpHtmlLib Guide

Documentation generated on Thu, 1 Sep 2005 17:05:09 -0700 by phpDocumentor 1.3.0RC3