<i id='cf1Vz'><tr id='cf1Vz'><dt id='cf1Vz'><q id='cf1Vz'><span id='cf1Vz'><b id='cf1Vz'><form id='cf1Vz'><ins id='cf1Vz'></ins><ul id='cf1Vz'></ul><sub id='cf1Vz'></sub></form><legend id='cf1Vz'></legend><bdo id='cf1Vz'><pre id='cf1Vz'><center id='cf1Vz'></center></pre></bdo></b><th id='cf1Vz'></th></span></q></dt></tr></i><div id='cf1Vz'><tfoot id='cf1Vz'></tfoot><dl id='cf1Vz'><fieldset id='cf1Vz'></fieldset></dl></div>

    <tfoot id='cf1Vz'></tfoot>
    • <bdo id='cf1Vz'></bdo><ul id='cf1Vz'></ul>

    <legend id='cf1Vz'><style id='cf1Vz'><dir id='cf1Vz'><q id='cf1Vz'></q></dir></style></legend>
    1. <small id='cf1Vz'></small><noframes id='cf1Vz'>

    2. Zend_Form - 基于数组的元素?

      Zend_Form - Array based elements?(Zend_Form - 基于数组的元素?)
        <bdo id='4BmhF'></bdo><ul id='4BmhF'></ul>

        <small id='4BmhF'></small><noframes id='4BmhF'>

          <tbody id='4BmhF'></tbody>
        <legend id='4BmhF'><style id='4BmhF'><dir id='4BmhF'><q id='4BmhF'></q></dir></style></legend>
          <tfoot id='4BmhF'></tfoot>
          <i id='4BmhF'><tr id='4BmhF'><dt id='4BmhF'><q id='4BmhF'><span id='4BmhF'><b id='4BmhF'><form id='4BmhF'><ins id='4BmhF'></ins><ul id='4BmhF'></ul><sub id='4BmhF'></sub></form><legend id='4BmhF'></legend><bdo id='4BmhF'><pre id='4BmhF'><center id='4BmhF'></center></pre></bdo></b><th id='4BmhF'></th></span></q></dt></tr></i><div id='4BmhF'><tfoot id='4BmhF'></tfoot><dl id='4BmhF'><fieldset id='4BmhF'></fieldset></dl></div>

              1. 本文介绍了Zend_Form - 基于数组的元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                使用 Zend_Form,我将如何创建这样的表单元素:

                Using Zend_Form, how would I create form elements like this:

                <input type="text" name="element[1]" value="" />
                <input type="text" name="element[2]" value="" />
                // etc...
                

                推荐答案

                您可以使用子表单:

                $form = new Zend_Form();
                
                $subForm = new Zend_Form_SubForm();
                $subForm->addElement('Text', '1')
                        ->addElement('Text', '2');
                
                $form->addSubForm($subForm, 'element');
                

                或者你也应该能够在表单元素上使用 setBelongsTo()(未经测试):

                Or you should also be able to use setBelongsTo() on the form elements (untested):

                $form = new Zend_Form();
                $form->addElement('Text', '1', array('belongsTo' => 'element'))
                     ->addElement('Text', '2', array('belongsTo' => 'element'));
                

                这篇关于Zend_Form - 基于数组的元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Zend_Controller_Router_Exception: quot;xyzquot; is not specified(Zend_Controller_Router_Exception:“xyz;未指定)
                Zend_Db_Table subquery(Zend_Db_Table 子查询)
                pcntl_fork and the MySQL connection is gone(pcntl_fork 和 MySQL 连接消失了)
                Change layout in the controller of Zend Framework 2.0(在 Zend Framework 2.0 的控制器中更改布局)
                Zend Mail Gmail SMTP(Zend 邮件 Gmail SMTP)
                Zend_Form: how to check 2 fields are identical(Zend_Form:如何检查 2 个字段是否相同)
                      <tbody id='AEVFw'></tbody>
                  • <legend id='AEVFw'><style id='AEVFw'><dir id='AEVFw'><q id='AEVFw'></q></dir></style></legend>

                    1. <small id='AEVFw'></small><noframes id='AEVFw'>

                      <i id='AEVFw'><tr id='AEVFw'><dt id='AEVFw'><q id='AEVFw'><span id='AEVFw'><b id='AEVFw'><form id='AEVFw'><ins id='AEVFw'></ins><ul id='AEVFw'></ul><sub id='AEVFw'></sub></form><legend id='AEVFw'></legend><bdo id='AEVFw'><pre id='AEVFw'><center id='AEVFw'></center></pre></bdo></b><th id='AEVFw'></th></span></q></dt></tr></i><div id='AEVFw'><tfoot id='AEVFw'></tfoot><dl id='AEVFw'><fieldset id='AEVFw'></fieldset></dl></div>
                      <tfoot id='AEVFw'></tfoot>

                        <bdo id='AEVFw'></bdo><ul id='AEVFw'></ul>