was not found in the haystack error for select element in zend

You might get this error while working on zend form which has select element on it. And most probably you are messing with this element on your controller or from your front end friend javascript [ that was in my case ]

Just put the following in the controller and you should be fine

$form->getElement('selectElementNameHere')->setRegisterInArrayValidator(FALSE);

This is a behavior of zend adding a default validator of inarray.
You would find more detailed explanation on zend website.

Advertisement

,

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.