使用 Zend
1.9 我正在尝试使用 Zend Form 模块生成表单。我的表格应该是这样的:
<form method="post" action="myaction">
<input type="text" name="editors[]" />
<input type="text" name="editors[]" />
<input type="text" name="editors[]" />
<input type="text" name="editors[]" />
<button type="submit" >Go</button>
</form>
当我在控制器中提交表单时,我希望看到如下所示的内容:
Zend_Debug::dump($this->getAllParams());
//I expect this output:
array (size=4)
'controller' => string 'myCotnroller' (length=8)
'module' => string 'MyModule' (length=14)
'action' => string 'test' (length=4)
'editors' =>
array (size=4)
0 => string '' (length=3)
1 => string '' (length=0)
2 => string '' (length=0)
3 => string '' (length=0)
上周我尝试了很多很多次都没有结果。我搜索了任何goog结果.你可以帮我吗?
我希望其中一些能帮助你的追求。
Zend 框架:在数组表示法
中使用表单元素高级Zend_Form用法
Zend_Form - 基于数组的元素?
如何配置Zend_Form以使用数组表示法?