I have a list box in which all the name of the companies are displayed. When I click on search button it displays the result. But my selected search values are not displayed in the list box. It vanishes when I click on search button.
We could achieve this in PHP like so:
select
option if($_POST['a']==1){selected="selected"} > ibm option>
select
But I want to implement the same thing in my select box in Zend Form. How can I do it?
This is the code I have currently for my Zend form select box:
$list = new Application_Model_Abc
$showlist = $list ->List()
foreach($showlist as $key => $value)
$name = $value['cName']
$companyName->addMultiOption($value['id'], $name)
$this->addElement($companyName)