Re: [fw-general] populating form from model

2010-05-16 Thread Diego Potapczuk
How about using the populate method? ::: Diego Potapczuk On Sun, May 16, 2010 at 12:42 PM, Aleksey Zapparov wrote: > Hello, > > Basically you can use Zend_Form::setDefaults(array $defaults) to populate > form with data retreived from your model as an array, else (if you are > using > Doctrine

Re: [fw-general] populating form from model

2010-05-16 Thread Aleksey Zapparov
Hello, Basically you can use Zend_Form::setDefaults(array $defaults) to populate form with data retreived from your model as an array, else (if you are using Doctrine for example, or by some other reason you can't use model's data with setDefaults() directly) you can extend Zend_Form to be able "r

[fw-general] populating form from model

2010-05-16 Thread tonystamp
Hello I'm wondering about the best practice for populating forms with model data. I've been creating my forms with an optional array parameter in the constructor for the model to be passed in to the form class. If the model is present, the form is loaded with the models data. This is done from w