baseform

Base Form Class for 'real' and fake form classes

An HTML-form building class, that supports registerable and unregisterable controls.

package

Subsystems-Forms

subpackage

Form

Methods

__construct

__construct() 

Adds a javascript to the form.

addScript(string $name, string $script) : boolean

This may be used for validation, dynamic controls, etc.

Arguments

$name

string

The internal name to reference the script. This is used by the Form object for removing the script later (if desired)

$script

string

The path to the script file, relative to the BASE of the site.

Response

boolean

Returns true if a script with the specified internal name does not already exist, and the new one was added, or false if not.

Sets form location data

location( $loc) : boolean

Arguments

$loc

Response

boolean

Adds form meta data (hidden inputs)

meta( $name,  $value) : boolean

Arguments

$name

$value

Response

boolean

Removes a javascript from the form.

removeScript(string $name) : boolean

Arguments

$name

string

The internal name of the script to remove. This was specified by the addScript() method, and is only used by the Form object.

Response

boolean

Returns true if the script was successfully removed. In practice, this method always returns true.

toHTML

toHTML( $form_id) 
abstract

Arguments

$form_id

Properties

meta

meta : 

Type(s)

scripts

scripts : 

Type(s)

name

name : 

Type(s)

method

method : 

Type(s)

action

action : 

Type(s)

enctype

enctype : 

Type(s)

style

style : 

Type(s)

horizontal

horizontal : 

Type(s)