Exponent v2.7.2

baseform
in package

Base Form Class for 'real' and fake form classes

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

Tags
subpackage

Form

Table of Contents

$action  : mixed
$enctype  : mixed
$horizontal  : mixed
$meta  : mixed
$method  : mixed
$name  : mixed
$scripts  : mixed
$style  : mixed
__construct()  : mixed
__get()  : null
Generic magic method
__isset()  : bool
Generic magic method
__set()  : mixed
Generic magic method We MUST create/set non-existing properties for Exponent code to work
__unset()  : mixed
Generic magic method
addScript()  : bool
Adds a javascript to the form.
location()  : bool
Sets form location data
meta()  : bool
Adds form meta data (hidden inputs)
removeScript()  : bool
Removes a javascript from the form.
toHTML()  : mixed

Properties

$horizontal

public mixed $horizontal = \false

$scripts

public mixed $scripts = array()

Methods

__construct()

public __construct() : mixed
Return values
mixed

__get()

Generic magic method

public __get( $property) : null
Parameters
$property :
Return values
null

__isset()

Generic magic method

public __isset( $property) : bool
Parameters
$property :
Return values
bool

__set()

Generic magic method We MUST create/set non-existing properties for Exponent code to work

public __set( $property,  $value) : mixed
Parameters
$property :
$value :
Return values
mixed

__unset()

Generic magic method

public __unset( $property) : mixed
Parameters
$property :
Return values
mixed

addScript()

Adds a javascript to the form.

public addScript(string $name, string $script) : bool

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

Parameters
$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.

Return values
bool

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

location()

Sets form location data

public location( $loc) : bool
Parameters
$loc :
Return values
bool

meta()

Adds form meta data (hidden inputs)

public meta( $name,  $value) : bool
Parameters
$name :
$value :
Return values
bool

removeScript()

Removes a javascript from the form.

public removeScript(string $name) : bool
Parameters
$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.

Return values
bool

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

toHTML()

public abstract toHTML(mixed $form_id) : mixed
Parameters
$form_id : mixed
Return values
mixed

Search results