-- jamest <[EMAIL PROTECTED]> wrote
(on Thursday, 24 April 2008, 06:31 AM -0700):
> I have a class extending Zend_Form which I have created a DisplayGroup for
> using:
>
> $this->addElements(array($nok_forename, $nok_surname, $nok_day, $nok_month,
> $nok_year, $nok_address1, $nok_address2, $nok_town, $nok_county,
> $nok_postcode, $nok_country));
>
> $nok =
> $this->addDisplayGroup(array('nok_forename','nok_surname','nok_day','nok_month','nok_year','nok_address1','nok_address2','nok_town','nok_county','nok_postcode','nok_country'),'nextofkin');
>
> This displays perfectly, although I am unsure where to put setLegend() in.
Add an additional parameter to your call:
array('legend' => 'this is my legend')
and this will follow the display group name.
> At first I thought $nok->setLegend(); but I can see that won't work. Do I
> have to add an array for options to $nok? If so, what is the code for it?
> The reference manual doesn't seem to cover setLegend() being applied in this
> way unless I have missed something.
The third parameter to addDisplayGroup() is a set of configuration
options, and those are documented in the manual.
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/