previousHTML_QuickForm::isRuleRegistered() (Previous) (Next) Outputting the formnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

HTML_QuickForm::applyFilter()

HTML_QuickForm::applyFilter() – Applies a filter for the given field(s)

Synopsis

require_once 'HTML/QuickForm.php';

void HTML_QuickForm::applyFilter ( mixed $element , mixed $filter )

Description

Applies a data filter for the given field(s). Filter is applied recursively.

Parameter

mixed $element

Form element name or array of such names. Special name '__ALL__' means all the form elements.

mixed $filter

Callback, either function name or array(&$object, 'method')

Throws

Possible PEAR_Error values
Error code Error message Reason Solution
QUICKFORM_INVALID_FILTER Callback function does not exist in QuickForm::applyFilter() Tried to pass a name of a non-existant function as a callback Check spelling

Note

since 2.0

This function can not be called statically.

previousHTML_QuickForm::isRuleRegistered() (Previous) (Next) Outputting the formnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: cweiske
Trim all whitespace from all elements:
<?php
$form
->applyFilter('__ALL__''trim');
?>