Thursday, January 19, 2012

Solution for 'not found in haystack' error in Zend


If you get a '%value%' was not found in the haystack' error when using select boxes in Zend, add the following to the form element:


$element->setRegisterInArrayValidator(false);

or directly when creating form:

$form->addElement('multiselect', 'elementname', array('RegisterInArrayValidator' => false));

1 comment: