Method |
Description |
|
__construct ( string $action = null, string $method = 'post', array $fields = null, string $indent = null ) : Form |
Constructor |
|
__get ( string $name ) : mixed |
Get method to return the value of fields[$name]. |
|
__isset ( string $name ) : boolean |
Return the isset value of fields[$name]. |
|
__set ( string $name, mixed $value ) : void |
Set method to set the property to the value of fields[$name]. |
|
__toString ( ) : string |
Output the form object as a string |
|
__unset ( string $name ) : void |
Unset fields[$name]. |
|
addElements ( mixed $e ) : Form |
Add a form element or elements to the form object. |
|
addFields ( array $fields ) : Form |
Alias for setFields() |
|
clear ( ) : Form |
Method to clear any session data used with the form for
security tokens, captchas, etc. |
|
factory ( string $action = null, string $method = 'post', array $fields = null, string $indent = null ) : Form |
Static method to instantiate the form object and return itself
to facilitate chaining methods together. |
|
filter ( array $filters ) : Form |
Method to filter current form values with the
applied callbacks and their parameters |
|
getAction ( ) : array |
Get the form action. |
|
getAttributes ( ) : array |
Get the attributes of the form object. |
|
getElement ( string $elementName ) : Element |
Get an element object of the form by name. |
|
getElementIndex ( string $elementName ) : integer |
Get the index of an element object of the form by name. |
|
getElements ( ) : array |
Get the elements of the form object. |
|
getErrors ( ) : array |
Get all form element errors. |
|
getField ( $name ) : array |
Get a single field from $initFieldsValues |
|
getFields ( ) : array |
Get the form fields |
|
getFormElement ( ) : array |
Get the main form element. |
|
getMethod ( ) : array |
Get the form method. |
|
getTemplate ( ) : string |
Get the form template for the render method to utilize. |
|
hasFile ( ) : boolean |
Get the $hasFile property |
|
isValid ( ) : boolean |
Determine whether or not the form object is valid and return the result. |
|
removeElement ( string $elementName ) |
Remove a form element |
|
render ( boolean $ret = false ) : void |
Render the form object either using the defined template or
by a basic 1:1 DT/DD tag structure. |
|
setAction ( string $action ) : Form |
Set the form action. |
|
setAttributes ( array | string $a, string $v = null ) : Form |
Set an attribute or attributes for the form object. |
|
setErrorDisplay ( string $container, array $attribs, boolean $pre = false ) : Form |
Set error pre-display globally across all form element objects |
|
setField ( string $name, array $field ) : Form |
Set a single field in $initFieldsValues |
|
setFieldValues ( array $values = null, array $filters = null ) : Form |
Set the field values. Optionally, you can apply filters
to the passed values via callbacks and their parameters |
|
setFields ( array $fields ) : Form |
Set the fields of the form object. |
|
setMethod ( string $method ) : Form |
Set the form method. |
|
setTemplate ( string $tmpl ) : Form |
Set a form template for the render method to utilize. |
|