i created a zend form which is able to generate subform with the elements like: items[0][price], items[0][count]; items[1][price] etc. in each row of a table i need to display certain data. so, in my view i created a html table and tried to iterate through the 'items' and insert certain form element in certain column of a table.
<table>
<?php foreach($this->form->getSubform('items') as $item) :?>
<tr>
<td>just some data like product name</td>
<td><?php echo $item->getElement('price');?></td>
<td><?php echo $item->getElement('count');?></td>
</tr>
<?php endforeach;?>
</table>
after that, each form element item do NOT have array name anymore, as i was expecting, but just like 'items' or 'count' in each row, so multidimensional array will not be returned.
if i generate the form in view (echo $this->form;), then form element names are ok, but how should i add some data in the table then..? preferably it should be done in view.