Emagister / zend-form-decorators-bootstrap

Zend_Form decorators for Twitter's Bootstrap UI
http://emagister.github.com/zend-form-decorators-bootstrap
168 stars 79 forks source link

decorators don't work when adding elements through $form->addElements(); #82

Open greggberry opened 11 years ago

greggberry commented 11 years ago

elements are wrapped in the default dt dd tags when doing the following:

$text1= new Zend_Form_Element_Text('text1'); $text1->setLabel('Text1');

$text2= new Zend_Form_Element_Text('text2'); $text2->setLabel('Text2');

$this->addElements(array($text1, $text2));

nicolashohm commented 11 years ago

i've the same problem :+1:

SamHennessy commented 11 years ago

I use $this->createElement(); to get around this.

E.g.: $dobMonth = $this->createElement('select','dobMonth', array('class' => 'span2'));

nicolashohm commented 11 years ago

yep i also use createElement, but i've to change the whole code in my existing project... thats not so nice :wink: