Inheritance diagram for Form:

This is the main form class that handles a variety of form tasks like adding / removing fields, setting layout, checking submission and validation status, etc.
Definition at line 68 of file form.inc.php.
Public Member Functions | |
| __construct ($layout=null) | |
| Constructor. | |
| __get ($name) | |
| Magic getter. | |
| __set ($name, $value) | |
| Magic setter. | |
| add ($type, $name, array $options=array()) | |
| Add a field to the form. | |
| getField ($name) | |
| get a field object from the form. | |
| replaceField ($type, $name, $options=array()) | |
| replace a field in our form with a new one. | |
| addSubmit ($title= 'Submit') | |
| add a ButtonField of type submit with a title to the form (shortcut function) | |
| remove ($name) | |
| remove a field form the form (useful for modifying existing form objects | |
| isSubmitted () | |
| Check to see if the form has been submitted. | |
| validate () | |
| Validate all form fields. | |
| setData ($data) | |
| Set data. | |
| getData ($fieldName=null) | |
| Get the data. | |
| hasError () | |
| Check all fields for an error. | |
| hasField ($field) | |
| Figure out if we have a field or not.... | |
| needsDrawn () | |
| Determine if we need our form drawn... | |
| isSubmittedAndValid () | |
| a helper function that checks to see if its submitted, validates it, and then tells us if we have errors. | |
| drawIfNeeded () | |
| shortcut function to draw the form if its needed: which is either not submitted or on error | |
| drawAll ($action=null, $submitText=null) | |
| Draw the form. | |
| draw () | |
| draw the entire form | |
| setError ($fieldName, $errorString=null) | |
| Mark a field as having an error. | |
| getCss () | |
| Get any special CSS styles that fields may define. | |
| assertFieldExists ($fieldName) | |
| Assert that a given field name actually exists in the form. | |
Static Public Member Functions | |
| autoload ($class) | |
| Magic function to load include files as needed. | |
Private Attributes | |
| $fields = array() | |
Array of Field objects. | |
| $method = 'post' | |
Request method to use, either post or get. | |
| $layout | |
| Layout object for displaying the form. | |
| $name | |
| Name of the form. Used with JavaScript. | |
| $action | |
| Url to post/get to. | |
| $onSubmit | |
| Url to post/get to. | |
|
|
Constructor.
Reimplemented in FormSync. Definition at line 81 of file form.inc.php. |
|
|
Magic getter.
Definition at line 100 of file form.inc.php. |
|
||||||||||||
|
Magic setter.
Reimplemented in FormSync. Definition at line 113 of file form.inc.php. |
|
||||||||||||||||
|
Add a field to the form.
Definition at line 152 of file form.inc.php. |
|
|
add a ButtonField of type submit with a title to the form (shortcut function)
Definition at line 201 of file form.inc.php. |
|
|
Assert that a given field name actually exists in the form.
Definition at line 440 of file form.inc.php. |
|
|
Magic function to load include files as needed.
Definition at line 452 of file form.inc.php. |
|
|
draw the entire form
Definition at line 402 of file form.inc.php. |
|
||||||||||||
|
Draw the form.
Definition at line 366 of file form.inc.php. |
|
|
shortcut function to draw the form if its needed: which is either not submitted or on error
Definition at line 352 of file form.inc.php. |
|
|
Get any special CSS styles that fields may define.
Definition at line 426 of file form.inc.php. Referenced by CollectionField::getCss(). |
|
|
Get the data.
Definition at line 277 of file form.inc.php. Referenced by CollectionField::getData(). |
|
|
get a field object from the form. this is intended for you to be able to edit fields already added to a form.
Definition at line 171 of file form.inc.php. |
|
|
Check all fields for an error.
Definition at line 299 of file form.inc.php. Referenced by FormSync::handleSubmit(), and FormSync::handleSubmitWithCallback(). |
|
|
Figure out if we have a field or not....
Definition at line 314 of file form.inc.php. Referenced by CollectionField::add(). |
|
|
Check to see if the form has been submitted.
Definition at line 225 of file form.inc.php. Referenced by FormSync::handleSubmit(), and FormSync::handleSubmitWithCallback(). |
|
|
a helper function that checks to see if its submitted, validates it, and then tells us if we have errors. saves 4-5 lines on common repetitive stuff.
Definition at line 335 of file form.inc.php. |
|
|
Determine if we need our form drawn...
Definition at line 323 of file form.inc.php. |
|
|
remove a field form the form (useful for modifying existing form objects
Definition at line 213 of file form.inc.php. |
|
||||||||||||||||
|
replace a field in our form with a new one.
Definition at line 186 of file form.inc.php. |
|
|
Set data.
Definition at line 244 of file form.inc.php. Referenced by CollectionField::setFieldsData(). |
|
||||||||||||
|
Mark a field as having an error.
Definition at line 412 of file form.inc.php. |
|
|
Validate all form fields.
Definition at line 233 of file form.inc.php. Referenced by FormSync::handleSubmit(), FormSync::handleSubmitWithCallback(), and CollectionField::validate(). |
|
|
Url to post/get to.
Definition at line 74 of file form.inc.php. |
|
|
Array of
Definition at line 70 of file form.inc.php. |
|
|
Layout object for displaying the form.
Definition at line 72 of file form.inc.php. |
|
|
Request method to use, either
Definition at line 71 of file form.inc.php. |
|
|
Name of the form. Used with JavaScript.
Definition at line 73 of file form.inc.php. |
|
|
Url to post/get to.
Definition at line 75 of file form.inc.php. |
1.3.9.1