I have zend framework controller. In init method i create a form and fill the drop-down box with
$form = new FORM_NAME();
$form->getElement('ZdGroup')->addMultiOptions($zendesk_groups);
then in action i check
$formData = $this->getRequest()->getParams();
if ($form->isValid($formData)) {
...
}
but isValid()
returns FALSE
if I delete this line
$form->getElement('ZdGroup')->addMultiOptions($zendesk_groups);
it return TRUE
.
I don't understand why, does anybody have an idea?
FORM_NAME()
class to know what your form is doing. – Elaboration