Hi Matthew,

Would it be possible to identity form elements passed to a display group either as strings or as the elements themselves? I'm trying to do the following:-

(Where each variable is an already-added instance of Zend_Form_Element e.g. $name_title = new Zend_Form_Element('text') )

        $groupPersonal = $this->addDisplayGroup(array(
            $name_title,
            $name_first,
            $name_last,
            $name_preferred,
            $birthday,
            $position,
            $personal_address_1,
            $personal_address_2,
            $personal_telephone,
            $personal_facsimile,
            $personal_mobile,
            $personal_email,
        ), 'one');
        $groupPersonal->setLegend('Personal details');

Two problems:-

a) It doesn't recognise these as valid elements (it only recognises string names) b) The 'addDisplayGroup' returns an instance of the form, not the newly-added group. Wouldn't it be more consistent to return the group object? Otherwise I'd want to create an instance of Zend_Form_DisplayGroup and then add that to the form, but I can't see how.

Cheers

--

Simon Mundy | Director | PEPTOLAB

""" " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "

202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
http://www.peptolab.com

Reply via email to