Found a very simple solution for those who looking for it to :)
Just do a:
$this->addDecorator('Fieldset');
where your form object is $this and you got your form in a fieldset!
Kind Regards..
Dytech wrote:
>
> Hey There,
>
> I'm looking for a way to always put form's in fieldsets.
>
> Currently i use:
>
> $oFieldset =
> $this->addDisplayGroup(array('title','news_date','image_id','teaser','text','url_segment'),'Fieldset_id',
> array('decorators' => array('FormElements',
> array('HtmlTag',
> array('tag' => 'dl')),
> 'Fieldset'
> )
> )
> );
> $oFieldset->removeDecorator('DtDdWrapper');
> $oFieldset->removeDecorator('HtmlTag');
>
> But since i always want all my elements inside the fieldset why doesn;'t
> this work :
> $this->addDisplayGroup($this->getElements(),'Name',array('options'));
>
> Thanks for your replies!
>
>
>
--
View this message in context: http://www.nabble.com/Automatic-generate-form-in-fieldset-tp19975185p19975744.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论