I have an order form that extends Zend_form:
class Form_Order extends Zend_Form
{
public function __construct($options = null)
{
parent::__construc开发者_如何学编程t($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?
Yes. Or you can add setter method $form->setProducts($products)
精彩评论