|
Previous Page |
Solar_Form |
Next Page |
Properties
Public
$attribs
(array) Attributes for the form tag itself.
The $attribs array holds HTML attributes for the
form itself (not for individual elements) such as
action, method, and enctype. Note that these
are "hints" for the presentation of the form, and may not
be honored by the view.
$elements
(array) The array of elements in this form.
The $elements array contains all elements in the form,
including their names, types, values, any invalidation messages,
filter callbacks, and so on.
In general, you should not try to set $elements yourself; instead, Solar_Form::setElement() and Solar_Form::setElements().
$feedback
(array) Overall feedback about the state of the form.
The $feedback array stores feedback messages for
the form itself (not for individual elements). For example,
"Saved successfully." or "Please correct the noted errors."
Each array element is an additional feedback message.
Note that the $feedback property pertains to the form as a whole, not the individual elements. This is as opposed to the 'invalid' key in each of the elements, which contains invalidation messages specific to that element.
Protected
$_Solar_Form
(array) User-provided configuration.
Keys are ...
request- (dependency) A Solar_Request dependency object.
attribs- (array) An array of <form> tag attributes; used for hinting the view on how to present the form. Defaults are 'method="post"', 'action="REQUEST_URI"', and 'enctype="multipart/form-data"'.
success- (string) The overall "success" message when validating form input. Default is Solar locale key SUCCESS_FORM.
failure- (string) The overall "failure" message when validating form input. Default is Solar locale key FAILURE_FORM.
filter- (dependency) A Solar_Filter dependency injection; default is empty, which creates a standard Solar_Filter object on the fly.
$_config
(array) Collection point for configuration values.
Inherited from Solar_Base.
Note that you do not define config defaults in $_config directly.
<?php
// DO NOT DO THIS
protected $_config = array(
'foo' => 'bar',
'baz' => 'dib',
);
?>
Instead, define config defaults in a protected property named for the class, withan underscore prefix.
For exmple, a "Vendor_Class_Name" class would define the default config array in "$_Vendor_Class_Name". This convention lets child classes inherit parent config keys and values.
<?php
// DO THIS INSTEAD
protected $_Vendor_Class_Name = array(
'foo' => 'bar',
'baz' => 'dib',
);
?>
$_default_attribs
(array) Default <form> tag attributes.
$_default_element
(array) Default values for each element.
Keys are ...
name- (string) The name attribute.
type- (string) The input or type attribute ('text', 'select', etc).
label- (string) A short label for the element.
value- (string) The default or selected value(s) for the element.
descr- (string) A longer description of the element, such as a tooltip or help text.
status- (bool) Whether or not the particular element has passed or failed validation (true or false), or null if there has been no attempt at validation.
require- (bool) Whether or not the element is required.
disable- (bool) If disabled, the element is read-only (but is still submitted with other elements).
options- (array) The list of allowed values as options for this element as an associative array in the form (value => label).
attribs- (array) Additional XHTML attributes for the element in the form (attribute => value).
invalid- (array) An array of messages if the value is invalid.
$_filter
(Solar_Filter) A Solar_Filter object for filtering form values.
$_filters
(array) The array of filters for the form elements.
$_request
(Solar_Request) Request environment object.
$_status
(bool) The validation status of the form.
$_submitted
(array) Array of submitted values.
Populated on the first call to _populate(), which itself uses Solar_Request::get() or Solar_Request::post(), depending on the value of $this->attribs['method'].
Private
None.
Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- _exception()
- _populate()
- _prepareName()
- _values()
- addFilter()
- addFilters()
- addInvalid()
- addInvalids()
- apiVersion()
- dump()
- getStatus()
- getValue()
- getValues()
- load()
- locale()
- orderElements()
- populate()
- reset()
- setAttribs()
- setElement()
- setElements()
- setFilterLocaleObject()
- setStatus()
- setType()
- setValue()
- setValues()
- validate()