Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend_Form and Zend_Filter

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

like image 682
pseudochaos Avatar asked Jan 24 '26 04:01

pseudochaos


1 Answers

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();
like image 139
Gordon Avatar answered Jan 25 '26 17:01

Gordon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!