开发者

Display data in table on a subform

开发者 https://www.devze.com 2023-01-18 23:49 出处:网络
I\'ve got a question regarding sub forms.开发者_JS百科 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

I've got a question regarding sub forms.

开发者_JS百科

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!


I've had a similar issue and ended up adding a radio form element (so no subforms) with a custom view helper.

$this->createElement('radio', 'someRadioButton')
     ->setAttribs( array('helper' => 'formRadioWithTable') );

My view helper extends Zend_View_Helper_FormRadio and defines formRadioWithTable() method, where all the HTML table markup comes up.

0

精彩评论

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