I need a little help clearing something with Zend_Form and adding filters to the element. Now I have the impression that when you add a filter to the form, which, when the form is submitted, that the filter was executed as part of the submission to the controller.
However, when testing my form for my horror, the StripTags filter does not seem to work, and I get data with HTML tags in the data.
The My Form element is as follows.
$address1 = new Zend_Form_Element_Textarea('address1');
$address1->addFilter('StripTags')
->addFilter('StringTrim')
->setAttrib('cols', 30)
->setAttrib('rows', 5)
->removeDecorator('DtDdWrapper')
->removeDecorator('label')
->removeDecorator('HtmlTag')
However, if I put in the text area, some data with html tags in it, and then validate the form, you can use
$formData = $this->_request->getPost();
if($form->isValid($formData){
...
Data is returned with tags in it. It is deleted only when passing data through the strip_tags () function .
, , StipTags , , ? .