|
|||
|
Hi,
I am trying (with very little success) to generate a form that a user clicks on, then this is sent and a lookup done in a database. The result is then passed back to a form to allow the user to alter the data returned from the database. How do I prepopulate a field in zend_frames? I have : $lastName = new Zend_Form_Element_Text('Student_LastName'); $lastName ->setLabel('Last Name') ->setRequired(true) ->addValidator('NotEmpty') ->setDecorators(array ( 'ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr')), )); I want to set the default value as $row.['lastname']. What is the best way to do this? I would think it would be with a decorator but after searching for an hour am going around in circles and think I may have just gradually made this very complicated in my head ) |
![]() |
| Thread Tools | |
| Display Modes | |
|
|