开发者

Handling n text elements in a zend form

开发者 https://www.devze.com 2023-02-09 13:47 出处:网络
I have an order form that extends Zend_form: class Form_Order extends Zend_Form { public function __construct($options = null)

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消