Hi Guys,

I still can not make it to work, I got the 1.5 ZF release, do I need to get
the one from the SVN?

Here is my form constructor code :

    public function __construct($options = null)
    {
        
        $name = new Zend_Form_Element_Text('name');
        $name->class = 'formtext';
        $name->setLabel('* Name:');
        $name->addValidators(array(array('validator' => 'NotEmpty'),
array('validator' => 'stringLength', 'options' => array(3, 50)),));     

        $submit = new Zend_Form_Element_Submit('add');
        $submit->class = 'button';
        $submit->setValue('Add');
        $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')),
                    )); 
                                                    
        $this->addElements(array(
            $name,
            $submit
        ));

                $this->setDecorators(array('FormElements', array('HtmlTag', 
array('tag' =>
'table')), 'Form'));   

                $this->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')),
            ));                 
            
    }
-- 
View this message in context: 
http://www.nabble.com/How-render-Zend_Form-to-html-table--tp15299082s16154p15371041.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to