Overview
Helper for building CSS-based forms.
This is a fluent class; all method calls except fetch() return $this, which means you can chain method calls for easier readability.
Package
This class is part of the Solar_View_Helper_Form package.
Inheritance:
Solar_View_Helper_Form
Configuration Keys
attribs
: Default attributes to use in the <form> tag.request
: A Solar_Request dependency injection.descr_part
: Where to place descriptions (in the 'label' or the 'value').decorator_tags
: Use these decorator tags around form parts.decorator_attribs
: Use these attributes for decorator tags.css_classes
: Use these CSS classes for form elements.label_suffix
: Attach this suffix to all labels.
Constants
None.
Public Properties
The Solar_View_Helper_Form class has no public properties; try the list of all properties.
Public Methods
These are all the public methods in the Solar_View_Helper_Form class.
You can also view the list of all public, protected, and private methods.
-
__call()
-
Magic __call() for addElement() using element helpers.
-
__construct()
-
Constructor.
-
__destruct()
-
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
__toString()
-
Magic __toString() to print out the form automatically.
-
_postConstruct()
-
Post-construction tasks to complete object construction.
-
addDecoratorAttribs()
-
Adds attributes to a single decorator part, merging with existing attributes.
-
addElement()
-
Adds a single element to the form.
-
addElements()
-
Adds multiple elements to the form.
-
addFeedback()
-
Adds to the form-level feedback message array.
-
addHtml()
-
Adds arbitrary raw HTML to the form stack outside the normal element structure.
-
addProcess()
-
Adds a submit button named 'process' to the form, using a translated locale key stub as the submit value.
-
addProcessGroup()
-
Adds a group of process buttons with an optional label.
-
auto()
-
Automatically adds multiple pieces to the form.
-
beginFieldset()
-
Begins a <fieldset> block with a legend/caption.
-
beginGroup()
-
Begins a group of form elements under a single label.
-
decorateAsDivs()
-
When fetching output, render the list and elements inside divs.
-
decorateAsDlList()
-
When fetching output, render elements as part of an HTML definition list.
-
decorateAsPlain()
-
When fetching output, render elements without any surrounding decoration.
-
decorateAsTable()
-
When fetching output, render elements as part of an HTML table.
-
dump()
-
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
endFieldset()
-
Ends a <fieldset> block.
-
endGroup()
-
Ends a group of form elements.
-
fetch()
-
Builds and returns the form output, adding a hidden CSRF element as needed.
-
form()
-
Main method interface to Solar_View.
-
getStatus()
-
Gets the form validation status.
-
locale()
-
Looks up class-specific locale strings based on a key.
-
meta()
-
Automatically adds attributes and feedback, and sets status, for the form as a whole from a Solar_Form object.
-
reset()
-
Resets the form entirely.
-
setAttrib()
-
Sets a form-tag attribute.
-
setAttribs()
-
Sets multiple form-tag attributes.
-
setCssClass()
-
Set the CSS class to use for particular element type.
-
setCssClasses()
-
Set the CSS classes to use for various element types.
-
setDecorator()
-
Set decoration tag to use for a particular form part.
-
setDecoratorAttribs()
-
Resets the attributes on a single decorator part, overwriting the existing attributes.
-
setDecorators()
-
Sets the decoration tags to use for various form parts.
-
setDescrPart()
-
Sets where the element description goes, 'label' or 'value'.
-
setLabelSuffix()
-
Use this suffix string on all labels; for example, ": ".
-
setStatus()
-
Sets the form validation status.