Display data in table on a subform
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.
精彩评论