zend-decorators

Use zend-decorator to format Zend_Form_Element_Radio in a table column with oher Zend_Form_Elements in rows

百般思念 提交于 2019-12-01 22:03:32
I want use decorators to format as table the following Zend_Form, placing a description in the first column and the Zend_Form_Element_Radio's options in second column and add 2 select in every row as you can see in the html example later. I need a concrete/working example. FORM class My_Form extends Zend_Form { const KIND_1 = 'dineer1'; const KIND_2 = 'dineer2'; const KIND_3 = 'dineer3'; const KIND_4 = 'dineer4'; const KIND_5 = 'dineer5'; const KIND_6 = 'dineer6'; public static $KINDS = array( 1 => self::KIND_1, 2 => self::KIND_2, 3 => self::KIND_3, 4 => self::KIND_4, 5 => self::KIND_5, 6 =>

ZEND form elements in a table containing also data from the database

大憨熊 提交于 2019-12-01 13:18:29
Hi there:) i've got a problem with decorators and form which would be in table and in this table want to have also data from database... I dont have any idea how to do this to have a structure like something below, lets say <table> <tr> <td><?php echo array[0]['name']?> //and here input from zend form <td> <select name='foo' id='bar'> <option value='something'>Foo</option> <option value='something2'>Foo2</option> </select> </td> </tr> </table> Ofcourse tr will be more and generated with foreach or some loop. I have something like this: <?php class EditArticles_Form_EditArticles extends Zend

ZEND form elements in a table containing also data from the database

喜欢而已 提交于 2019-12-01 10:28:16
问题 Hi there:) i've got a problem with decorators and form which would be in table and in this table want to have also data from database... I dont have any idea how to do this to have a structure like something below, lets say <table> <tr> <td><?php echo array[0]['name']?> //and here input from zend form <td> <select name='foo' id='bar'> <option value='something'>Foo</option> <option value='something2'>Foo2</option> </select> </td> </tr> </table> Ofcourse tr will be more and generated with

Zend Framework: How do I remove the decorators on a Zend Form Hidden Element?

北城以北 提交于 2019-11-29 19:58:58
I'm trying to remove the default decorators on a hidden form element. By default, the hidden element is displayed like this: <dt>Hidden Element Label (if I had set one)</dt> <dd><input type="hidden" name="foobar" value="1" id="foobar"></dd> I don't want my hidden element to take up space on my page. I want to remove all the default decorators so all I'm left with is the input tag. <input type="hidden" name="foobar" value="1" id="foobar"> How can I achieve this? For hidden field you need only one decorator - ViewHelper: $field = new Zend_Form_Element_Hidden('id'); $field->setDecorators(array(

Zend_Framework Decorators Wrap Label and ViewHelper inside a div

依然范特西╮ 提交于 2019-11-28 20:37:17
问题 I am new to this, zend decoration malarchy, but i have two significant questions that i cant get my head around. Question one is followed by some example $decorate = array( array('ViewHelper'), array('Description'), array('Errors', array('class'=>'error')), array('Label', array('tag'=>'div', 'separator'=>' ')), array('HtmlTag', array('tag' => 'li', 'class'=>'element')), ); ... $name = new Zend_Form_Element_Text('title'); $name->setLabel('Title') ->setDescription("No --- way"); $name-