Re: HTML_QuickForm - Assign a filter to a group element
| From: | Alexey Borzov | Date: | Tue, 24 Feb 2004 10:27:29 +0000 |
| Subject: | Re: HTML_QuickForm - Assign a filter to a group element | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10895@lists.php.net to get a copy of this message | ||
Hi!
Torsten Pohl wrote:
I have the following problem with PEAR::HTML_QuickForm and the simplified example code:As Bertrand already pointed out, this was a bug in QuickForm: http://pear.php.net/bugs/bug.php?id=735 The fix will be in version 3.2.2 due out (hopefully) soon.$elements = array(); $elements[] = &HTML_QuickForm::createElement('text', 'element1'); $elements[] = &HTML_QuickForm::createElement('text', 'element2'); $group = $form->addGroup($elements, 'group');How can I assign a _filter_ (not a rule) to a group element? Adding the line$form->applyFilter('element2', 'trim');results in the error message QuickForm Error: nonexistent html element Element 'element2' does not exist in HTML_QuickForm::applyFilter() Can anybody tell me how I have to address the group element to add a filter?