Properties

Properties existing in the Solar_Form class.

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) Default configuration values.

$_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',
);

$_csrf

(Solar_Csrf) Cross-site request forgery detector.

$_default_attribs

(array) Default <form> tag attributes.

$_default_element

(array) Default values for each element.

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.

$_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