$_sections
$_sections :
Horde_Form Master Class.
$_hiddenVariables :
useToken(boolean $token = null) : boolean
Sets or gets whether the form should be verified by tokens.
Tokens are used to verify that a form is only submitted once.
boolean | $token | If specified, sets whether to use form tokens. |
Whether form tokens are being used.
getRenderer(array $params = array()) : object
Get the renderer for this form, either a custom renderer or the standard one.
To use a custom form renderer, your form class needs to
override this function:
function getRenderer()
{
return new CustomFormRenderer();
}
... where CustomFormRenderer is the classname of the custom renderer class, which should extend Horde_Form_Renderer.
array | $params | A hash of renderer-specific parameters. |
Horde_Form_Renderer The form renderer.
removeVariable(\Horde_Form_Variable|string $var) : boolean
Removes a variable from the form.
As only variables can be passed by reference, you need to call this
method this way if want to pass a variable name:
$form->removeVariable($var = 'varname');
\Horde_Form_Variable|string | $var | Either the variable's name or the variable to remove from the form. |
True if the variable was found (and deleted).
renderActive(\Horde_Form_Renderer $renderer = null, \Variables $vars = null, string $action = '', string $method = 'get', string $enctype = null, boolean $focus = true)
Renders the form for editing.
\Horde_Form_Renderer | $renderer | A renderer instance, optional since Horde 3.2. |
\Variables | $vars | A Variables instance, optional since Horde 3.2. |
string | $action | The form action (url). |
string | $method | The form method, usually either 'get' or 'post'. |
string | $enctype | The form encoding type. Determined automatically if null. |
boolean | $focus | Focus the first form field? |
renderInactive(\Horde_Form_Renderer $renderer = null, \Variables $vars = null)
Renders the form for displaying.
\Horde_Form_Renderer | $renderer | A renderer instance, optional since Horde 3.2. |
\Variables | $vars | A Variables instance, optional since Horde 3.2. |
validate(\Variables $vars = null, $canAutoFill = false) : boolean
Validates the form, checking if it really has been submitted by calling isSubmitted() and if true does any onSubmit() calls for variable types in the form. The _submitted variable is then rechecked.
\Variables | $vars | A Variables instance, optional since Horde 3.2. |
$canAutoFill |
True if the form is valid.
_getInfoFromVariables(array $variables, object $vars, array $info)
Fetch the field values from a given array of variables.
array | $variables | An array of Horde_Form_Variable objects to fetch from. |
object | $vars | The Variables object. |
array | $info | The array to be filled with the submitted field values. |
isSubmitted() : boolean
Determines if this form has been submitted or not. If the class var _submitted is null then it will check for the presence of the formname in the form variables.
Other events can explicitly set the _submitted variable to false to indicate a form submit but not for actual posting of data (eg. onChange events to update the display of fields).
True or false indicating if the form has been submitted.