(on Thursday, 31 July 2008, 10:07 PM +0200):
> I'm getting on quite well with Zend_Form now including my custom elements.
>
> Unfortunately, a new question came up.
>
> For style reasons, form design bases on
>
> <fieldset>
> <div class="inner">
> <form> .... </form>
> </div>
> </fieldset>
>
> I now I can use display groups to create fieldsets but
> a) is this the best possible way
> and
> b) if so, how could I use the display group decorator to show both a
> fieldset and a div. There are rare examples on display group decorators
> on the internet unfortunately :(
This is relatively easy, actually. :)
$form->addDisplayGroup(array(...elements...), array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'div', 'class' => 'inner'),
'Fieldset',
),
));
It's just like adding decorators for an element or a form.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论