Sonic for Hire by Machinima
new pokemon
Sushi Etiquette
Tags: Art, Creative, fuck yea!, How to eat sushi the correct way, Maguro maguro maguro maguro, Maguro Umai Ne!, Sushi EtiquetteHello Kitty got into some trouble.
Zend Framework, Subforms and organization
Tags: group subforms together, multiple subforms, zend, zend frameworkRecently I have been tasked to organize some form fields into nice columns. Normally you would use display groups. Since you really can not nest display groups, subforms were the answer. I have split my elements into 2 different sections and w/in these sections are basic incarnations of forms at the basic level ( utilizing the init() and extending Zend_Form() ). w/in each form I have many elements and display groups.
so in a nut shell here’s what i have,
$left = new Zend_Form_SubForm();
then you add the subforms you want inside of this "subform"
$left->setSubForms(array(
‘sub1′ => $sub1,
‘sub2′ => $sub2
));
you do the same thing for the other subform you want to add decorators to.
$right = new Zend_Form_SubForm();
$right->setSubForms(array(
‘sub3′ => $sub3,
‘sub4′ => $sub4
));
then to your original form you add these new "$left" and "$right" subforms
$this->setSubForms(array(
‘left’ => $left,
‘right’ => $right
));
you can then apply decorators to the "$left" and "$right" subforms as you see fit.
since i want to drop the fieldsets that encapsulate the elements inside mine looks like this, you do the same to the other one.
$left->setDecorators(array(
‘FormElements’,
array(‘HtmlTag’, array(‘tag’ => ‘div’)),
));





