Form Class for building and displaying a form
An HTML-form building class, that supports registerable and unregisterable controls.
package |
Subsystems-Forms |
---|---|
subpackage |
Form |
__construct()
addScript(string $name, string $script) : boolean
This may be used for validation, dynamic controls, etc.
string
The internal name to reference the script. This is used by the Form object for removing the script later (if desired)
string
The path to the script file, relative to the BASE of the site.
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( $module = null, $ajax_action = null, $div_to_update = null)
location( $loc) : boolean
boolean
register(string $name, string $label, \formcontrol $control, boolean $replace = true, array $params = null) : boolean
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.
string
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.
array
boolean
Returns true if the new Control was registered.
registerAfter(string $afterName, string $name, string $label, object $control, array $params = null) : boolean
string
The internal name of the Control to register the new Control after.
string
The internal name of the new Control.
string
object
The Control object to register with the Form.
array
boolean
Returns true if the new Control was registered.
registerBefore(string $beforeName, string $name, string $label, object $control, array $params = null) : boolean
string
The internal name of the Control to register the new Control before.
string
The internal name of the new Control.
string
object
the Control object to register with the Form.
array
boolean
Returns true if the new Control was registered.
removeScript(string $name) : boolean
string
The internal name of the script to remove. This was specified by the addScript() method, and is only used by the Form object.
boolean
Returns true if the script was successfully removed. In practice, this method always returns true.
secure()
toHTML( $form_id)
unregister(string $name) : boolean
string
The internal name of the control to remove from the Form.
boolean
Returns true if the Control was unregistered.
controls :
controlIdx :
controlLbl :
id :
div_to_update :
is_paged :
validationScript :
scripts :
name :
method :
action :
enctype :
style :
horizontal :