Login   Register  
PHP Classes
elePHPant
Icontem

File: test.conf

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Herman Veluwenkamp  >  form_template  >  test.conf  >  Download  
File: test.conf
Role: ???
Content type: text/plain
Description: Form config file for demo.
Class: form_template
Form generation and validation class.
Author: By
Last change:
Date: 2000-05-30 23:03
Size: 1,552 bytes
 

Contents

Class file image Download
# set this to client if client-side validation is to be done via javascript and regular expressions
#$validation:client
# try commenting it out to see the difference.

$form_html:NAME="input_form" METHOD="post"

# format of lines is - id :type  :description :default value :display options :validation regexp :validation message :[selection options]

# examples of each type of field are:

beta  :text     :Text Field Beta              :default    :SIZE="16" MAXLENGTH="16"      :/^\D*$/ :Only text is allowed.
omega :box      :Box Field Omega              :123        :ROWS="2" COLS="10 WRAP="HARD":/^[\d|\s]*$/  :Only numbers are allowed.

# for the following fields, the validation regexp field indicates the number of selections to accept. for select and radio fields these can only be 0 or 1.
alpha :select   :Select Field Alpha           :           :SIZE="4"                      :/0|1/       :Select an option.         :one,two,three,four:A - one,B - two,C - three,D - four
theta :check    :Checkbox Field Theta         :           :                         :/2|3|4/     :Select 2,3 or 4 values.   :one,two,three,four:A - one,B - two,C - three,D - four
gamma :multi    :Multiple Select Field Gamma  :one,four   :SIZE="4"                      :/2|3/       :Select 2 or 3 values.     :one,two,three,four:A - one,B - two,C - three,D - four
delta :radio    :Radio Field Delta            :           :                         :/1/         :Select an option.         :one,two,three,four:A - one,B - two,C - three,D - four