在子表单上显示表中的数据
我有一个关于子表单的问题。
目前我有 2 个子表单和一个父表单。在一个子表单上,我想从模型中获取数据,并且需要将其显示在表格中,第一列需要有一个单选按钮,因为我想知道已选择哪一行。但由于表格不是表单元素,怎么能做到这一点呢?
我应该放弃子表格还是您建议做什么?
谢谢!
I've got a question regarding sub forms.
Currently I've got 2 sub forms and one parent form. On one of the sub forms I want to get data from the model and this needs to be displayed in a table, the first column needs to have a radio button as I want to know which row has been selected. But as a table isn't a form element how can this be done?
Should I drop the sub forms or what do you suggest to do?
Thx!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了类似的问题,最终添加了一个带有自定义视图助手的单选表单元素(因此没有子表单)。
我的视图助手扩展了
Zend_View_Helper_FormRadio
并定义了formRadioWithTable()
方法,所有 HTML 表格标记都出现在该方法中。I've had a similar issue and ended up adding a radio form element (so no subforms) with a custom view helper.
My view helper extends
Zend_View_Helper_FormRadio
and definesformRadioWithTable()
method, where all the HTML table markup comes up.