fakeform

Extends \form

Fake Form Class for displaying a wysiwyg form designer

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

package

Subsystems-Forms

subpackage

Form

Methods

__construct

__construct() 
inherited

Adds a javascript to the form.

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

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.

ajaxUpdater

ajaxUpdater( $module = null,  $ajax_action = null,  $div_to_update = null) 
inherited

Arguments

$module

$ajax_action

$div_to_update

controlToHTML

controlToHTML( $name,  $label = null) 

Arguments

$name

$label

Sets form location data

location( $loc) : boolean
inherited

Arguments

$loc

Response

boolean

Adds form meta data (hidden inputs)

meta( $name,  $value) : boolean
inherited

Arguments

$name

$value

Response

boolean

Registers a new Control with the form. This function will simply append the new Control to the end of the Form.

register(string $name, string $label, \formcontrol $control, boolean $replace = true, array $params = null) : boolean
inherited

Arguments

$name

string

The internal name of the control. This is used for referring to the control later. If this is a null string, the Control will not be registered, and this function will return false.

$label

string

$control

\formcontrol

The Control object to register with the form.

$replace

boolean

boolean dictating what to do if a Control with the specified internal name already exists on the form. If passed as true (default), the existing Control will be replaced. Otherwise, the Control registration will fail and return false.

$params

array

Response

boolean

Returns true if the new Control was registered.

Registers a new Control, placing it after a pre-existing named Control. If the Control that the caller wants to insert after does not exist, the new Control is appended to the end of the Form.

registerAfter(string $afterName, string $name, string $label, object $control, array $params = null) : boolean
inherited

Arguments

$afterName

string

The internal name of the Control to register the new Control after.

$name

string

The internal name of the new Control.

$label

string

$control

object

The Control object to register with the Form.

$params

array

Response

boolean

Returns true if the new Control was registered.

Registers a new Control, placing it before a pre-existing named Control. If the Control that the caller wants to insert the new Control before does not exist, the new Control is prepended to the form.

registerBefore(string $beforeName, string $name, string $label, object $control, array $params = null) : boolean
inherited

Arguments

$beforeName

string

The internal name of the Control to register the new Control before.

$name

string

The internal name of the new Control.

$label

string

$control

object

the Control object to register with the Form.

$params

array

Response

boolean

Returns true if the new Control was registered.

Removes a javascript from the form.

removeScript(string $name) : boolean
inherited

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.

secure

secure() 
inherited

style_form

style_form() 

toHTML

toHTML( $form_id) 
inherited abstract

Arguments

$form_id

Unregisters a previously registered Control.

unregister(string $name) : boolean
inherited

Arguments

$name

string

The internal name of the control to remove from the Form.

Response

boolean

Returns true if the Control was unregistered.

Properties

rank

rank : 

Type(s)

even

even : 

Type(s)

edit_class

edit_class : 

Type(s)

edit_icon_class

edit_icon_class : 

Type(s)

delete_class

delete_class : 

Type(s)

delete_icon_class

delete_icon_class : 

Type(s)

forms_id

forms_id : 

Type(s)

controls

controls : 
inherited

Type(s)

controlIdx

controlIdx : 
inherited

Type(s)

controlLbl

controlLbl : 
inherited

Type(s)

id

id : 
inherited

Type(s)

div_to_update

div_to_update : 
inherited

Type(s)

is_paged

is_paged : 
inherited

Type(s)

validationScript

validationScript : 
inherited

Type(s)

meta

meta : 
inherited

Type(s)

scripts

scripts : 
inherited

Type(s)

name

name : 
inherited

Type(s)

method

method : 
inherited

Type(s)

action

action : 
inherited

Type(s)

enctype

enctype : 
inherited

Type(s)

style

style : 
inherited

Type(s)

horizontal

horizontal : 
inherited

Type(s)