auFormElement
The auFormElement abstract class is part of the auLib package. It is defined in the auForm.php file and used as the base class for every other class in that file.
Usage
There is not generally a reason to use auFormElement directly, so a list of descendant classes is also included on this page:
- auFormContainer
- auForm (note that an auForm object can not be added to an auFormContainer.)
- auFormFieldset
- auFormData
- auFormText
- auFormHTML
- auFormField
- auFormButtons
Protected Data
$ownerForm
The form object this element belongs to.
$parent
The container that immediately contains this element.
$error
The error message for this element, or false if no errors have been found.
Protected Functions
CheckInput
CheckInput()
Checks the element value for errors. This needs to be overridden to actually do the check, otherwise it always returns true. If an error is found, the message should be saved in $this->error.
- @return = Whether the element has errors.
GetErrors
GetErrors()
Gets the error with the element, if any.
- @return = Error text, or false.
GetLabel
GetLabel()
Gets the label of the element, if any. This needs to be overridden for elements that have labels, otherwise it always returns an empty string.
- @return = Label of the element.
WriteHTML
WriteHTML()
This is an abstract function, so all non-abstract classes that extend auFormElement must provide this function. It should write out the HTML for the element.