Thanks for the reply, looks like you got in just before my edit. I manged to fix it by swapping some code over, although it still worked when I moved it back, so I will mark it down as user error.
Mark Steudel-3 wrote: > > Can you post a bit more code? > > -----Original Message----- > From: jamest [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 23, 2008 8:17 AM > To: [email protected] > Subject: [fw-general] Zend_Form_Element_Select and populate > > > I have a form with a couple of Zend_Form_Element_Select's in as well as a > couple of Zend_Form_Element_Radio's in which aren't getting populated > after > using $form->populate($data) where $data is received from a query on a > database if a user is logged in. > > So if a user is logged in, their data is retrieved from the database and > put > in to the form. This works perfectly for the text area's and text boxes > but > not the selects and radio's. > > I have even tried to set defaults in the actual form using both > > ->setValue('this value','This Value') > > and > > ->setDefault('This Value') > > Both do nothing, they don't even throw up and error messages. > > When I first created a form in ZF I used $form->createElement. When I did > this I could set the default value of selects and radio's by putting > 'value' > in the options array. > > I'm at a bit of a loose end with this one. > -- > View this message in context: > http://www.nabble.com/Zend_Form_Element_Select-and-populate-tp16834660p16834 > 660.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Zend_Form_Element_Select-and-populate-tp16834660p16894493.html Sent from the Zend Framework mailing list archive at Nabble.com.
