I'm pretty much a newbie to Zend's forms and decorators, and what I need to do is the following:
I'm trying to generate a form that looks as follows (in a table):
| label | upload form | submit button | info text |
| label | 开发者_如何学Cupload form | submit button | info text |
...
One line for each element in my array of stuff.
The label and info text are just text outputs, not form fields.
I understand that File decorators need to be handled differently from form fields and that the text outputs need to be added with decorators, but I am at a complete loss on how to achieve this. I can generate the form elements, but I have no idea how to do any of the decorators, and the documentation isn't helping at all.
I'm hoping some kind soul out there has solved this problem already.
Please read http://devzone.zend.com/article/3450 . I try to do that. But i have not time to do completely.
$element = new Zend_Form_element_File('file1');
$element->setLable('label');
$submit = new Zend_Form_Element_Submit('submit');
$form->addElements($element, $submit);
$form->setDescription('info text ');
$form->setDecoraotrs(array(
'FormElements',
array('HtmlTag', array('tag' => 'table')),
'Form',
'Description'
));
精彩评论