You should be populating the values of the form in your model before passing it as a completed whole through to the view, then if you have to do any autocomplete stuff, do it in javascript.
On Mon, Apr 6, 2009 at 4:43 PM, Marko Korhonen < marko.korho...@datafisher.com> wrote: > > Hi, > > I have made my model system as: > Model, Model_DbTable, Model_DbTable_Row etc... > > I have always declared by models in controller, but MVC seems > to "allow" View to command models also? > I also try to live by the "Fat models, thin controllers" rule... > > So I made following: > > <select name="faculty" id="faculty"> > > <option value="">-- Filter by Faculty --</option> > <?php $model = new Material_Model_Faculty(); foreach > ($model->getAll() as > $faculty): ?> > <option value="<?= $this->url(array("faculty" => $faculty->id), > "materials") ?>"><?= $faculty->name ?></option> > <?php endforeach; ?> > > </select> > > > > This is kinda "religious" question, I know... =) > But this approach gives me very flexible developing... > > br, Marko > -- > View this message in context: > http://www.nabble.com/MVC---Model-in-View-tp22904523p22904523.html > Sent from the Zend Framework mailing list archive at Nabble.com. > >