Zend_Form and Zend_Filter

How to disable filtering in Zend_Form before re-filling it?

+3
source share
1 answer

You cannot disable them.

You can do something like:

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

However, afaik Zend_Form will filter the values ​​only when you get them from the form, and not when filling out the form, so the above is pointless. If you are using the original values, use

$form->getUnfilteredValues();
+6
source

Source: https://habr.com/ru/post/1736166/


All Articles