Hello,
In controller I do:
$table = new Application_Model_DbTable_Reservations();
$form->populate($table->getReservation($id));
Then in form I do:
$reservationStatus = new Zend_Form_Element_Select('status');
$reservationStatus ->addMultiOptions(array('OK', 'Canceled'));
And it shows me Droplist with OK and Canceled options but do *NOT*select the
value from DB.
If I do, for ex:
$reservationStatus = new Zend_Form_Element_Text('status');
It shows me selected value from DB, but I want to give user only ENUM to
choose.
How to solve this problem - show selected value and give user droplist same
time?
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/populate-Zend-Form-Element-Select-show-selected-from-DB-tp3661632p3661632.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]