Matthew Weier O'Phinney-3 wrote:
> 
> Plus, you'll need to ensure the elements and labels are in table data
> and table rows:
> 
>     $form->setElementDecorators(array(
>         'ViewHelper',
>         'Errors',
>         array('decorator' => array('td' => 'HtmlTag'), 'options' =>
> array('tag' => 'td')),
>         array('Label', array('tag' => 'td')),
>         array('decorator' => array('tr' => 'HtmlTag'), 'options' =>
> array('tag' => 'tr')),
>     ));
> 
> For your 'submit' button, you'll want to modify the decorators so the
> submit spans both columns:
> 
>     $form->submit->setDecorators(array(
>         array(
>             'decorator' => 'ViewHelper', 
>             'options' => array('helper' => 'formSubmit')),
>         array(
>             'decorator' => array('td' => 'HtmlTag'), 
>             'options' => array('tag' => 'td', 'colspan' => 2)),
>         array(
>             'decorator' => array('tr' => 'HtmlTag'), 
>             'options' => array('tag' => 'tr')),
>     ));
> 
> Enjoy.
> 
> -- 
> Matthew Weier O'Phinney
> PHP Developer            | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
> 
> 

This works great except for two issues I have. I want to be able to put the
submit button aligned with the form fields which means I would like to have
and empty <td> where the label would print id we chose to display it. I
would also like to have the ability to have the labels on the right hand
side and the form fields on the left. How do I set the decorators to do
this?
-- 
View this message in context: 
http://www.nabble.com/How-render-Zend_Form-to-html-table--tp15299082p16721252.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to