pseudochaos
pseudochaos

Reputation: 33

Zend_Form and Zend_Filter

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

Upvotes: 3

Views: 785

Answers (1)

Gordon
Gordon

Reputation: 317197

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();

Upvotes: 6

Related Questions