<small id='qzPlP'></small><noframes id='qzPlP'>

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

      • <bdo id='qzPlP'></bdo><ul id='qzPlP'></ul>

        如何配置 Zend_Form 以使用数组表示法?

        时间:2023-05-30

        <small id='Wlf32'></small><noframes id='Wlf32'>

        <legend id='Wlf32'><style id='Wlf32'><dir id='Wlf32'><q id='Wlf32'></q></dir></style></legend>

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

                <tbody id='Wlf32'></tbody>
                <tfoot id='Wlf32'></tfoot>
                • 本文介绍了如何配置 Zend_Form 以使用数组表示法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在配置 Zend_Form 时遇到困难.我有一个 Zend_Form 子类.该表格包含一些必需信息和一些附加信息.我希望可以通过数组访问附加信息.提交的数据看起来像这样:

                  I'm having difficulty configuring Zend_Form. I have a Zend_Form sub-class. The form has some required information and some additional information. I want the additional information to be accessible via an array. The submitted data will look something like this:

                  $formData['required1']
                  $formData['required2']
                  $formData['addiotnalData']['aData1']
                  $formData['addiotnalData']['aData2']
                  

                  我在谷歌上搜索并尝试了我找到的所有建议(使用 subForms 并设置 Zend_Form::setIsArray($flag)Zend_Form::setElementsBelongTo($array) 方法),但还没有想出如何做到这一点.

                  I've Googled this and tried all the suggestions I've found (using subForms and setting the Zend_Form::setIsArray($flag) and Zend_Form::setElementsBelongTo($array) methods), but have not figured out how to do this.

                  我做错了什么?如何设置表单元素的名称,以便我可以使用数组表示法访问数据?

                  What am I doing wrong? How do I set the names of form elements so that I can access the data with array notation?

                  推荐答案

                  已排序!问题是正在使用的自定义装饰器.

                  Sorted it! The problem is a custom decorator that was being used.

                  //In
                  $subForm = new Form_SubForm(); //this can be a Zend_Form or Zend_Form_SubForm     
                  $subForm->setIsArray(true);
                  $this->addSubForm($subForm, 'subform');
                  

                  元素将以 subform-elementname 的 id 和 subform[elementname] 的名称呈现.

                  Elements will be rendered with a id of subform-elementname and a name of subform[elementname].

                  这篇关于如何配置 Zend_Form 以使用数组表示法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Zend Framework 2 和 Doctrine 2 - 多个数据库的配置 下一篇:如何结合zend框架和Codeigniter?

                  相关文章

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

                      <legend id='nAa9v'><style id='nAa9v'><dir id='nAa9v'><q id='nAa9v'></q></dir></style></legend>

                      <tfoot id='nAa9v'></tfoot>

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