Thank You Daniel Latter
---------- Forwarded message ---------- From: Daniel Latter <[email protected]> Date: 2009/1/31 Subject: Re: [fw-general] Populating Zend_Form_Element_Select from database example To: Deepak Shrestha <[email protected]> Are you sure your setting $this->data variable in the form class?, and if so var_dump it to see what it contains? Thank You Daniel Latter 2009/1/31 Deepak Shrestha <[email protected]>: > On Sat, Jan 31, 2009 at 10:37 PM, gerardroche <[email protected]> wrote: >> >> you would just do this >> >> try this first: >> >> $data = array( >> 'location' => 'location1' >> ); >> $form->populate($data); >> >> >> when the form is displayed it should show a select list of location options >> with location1 selected. >> >> > > I tried it but I don't see any value in my select element (it's empty) > plus it still shows the same error message at the bottom of the form > [Invalid argument supplied for foreach()]. My question is how to > populate the select element (before selecting anything from it). > > Thanks for your valuable time! > > -- > ======================= > Registered Linux User #460714 > Currently Using Fedora 8, 10 > ======================= >
