Zend_Form and Zend_Filter

793 Views Asked by At

How to disable filtering in Zend_Form before its re-populating?

1

There are 1 best solutions below

0
On BEST ANSWER

You cannot disable them.

You could do something like:

$filters = $form->getElementFilters();
$form->setElementFilters( array() );
$form->populate($data);
$form->setElementFilters( $filters );

However, afaik Zend_Form will only filter the values when you get them from the form and not when you populate the form, so the above is pointless. In case you are after the raw values, use

$form->getUnfilteredValues();