Reputation: 1977
I have an order form that extends Zend_form:
class Form_Order extends Zend_Form
{
public function __construct($options = null)
{
parent::__construct($options);
...
Each order can have any number of products. What's the best way to pass in a list of products to repopulate the form? Just add a "values = array()" after "options"?
Bonus! How do I validate it?
Upvotes: 0
Views: 57
Reputation: 2911
Yes. Or you can add setter method $form->setProducts($products)
Upvotes: 1