Re: Re: Bug #6511 [Opn->Bgs]: problems displaying a group element with an inner group

From: Date: Thu, 19 Jan 2006 01:49:57 +0000
Subject: Re: Re: Bug #6511 [Opn->Bgs]: problems displaying a group element with an inner group
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-3387@lists.php.net to get a copy of this message
On 1/18/06, Marques Johansson <marques@displague.com> wrote: > It seems like the functionality is present in the classes, as Elements > can contain Elements that contain Elements, and a group is just an > extension of Element. There seems to be little in the way of change > needed to correctly display them (as it properly stores the structure). > > If I fix this display problem with QF3, would it be accepted into QF3? > or are you waiting for QF4? > You can always try, but I've had trouble getting code into QF before (althouh, to their credit, they did put something in which was reasonably sufficient in one case). You can always supply your own element type to handle this. If you do go ahead with trying to fix or hack this I suggest looking at the SubForm element I created for DB_DataObject_FormBuilder. It allows taking one form object and embedding it within another. It's not perfect, but it does reasonably well at least. I've hacked around most of the major issues. http://cvs.php.net/viewcvs.cgi/pear/DB_DataObject_FormBuilder/FormBuilder/QuickForm/SubForm.php?view=markup You may even be able to use this element to do what you're trying to do. > > PEAR Bug Database wrote: > > >ATTENTION! Do NOT reply to this email! > >To reply, use the web interface found at > >http://pear.php.net/bugs/bug.php?id=6511&edit=2 > > > > > > ID: 6511 > > Updated by: mansion@php.net > > Reported By: marques at displague dot com > >-Status: Open > >+Status: Bogus > > Id: 6511 > > Type: Bug > > Package: HTML_QuickForm > > PHP Version: Irrelevant > > New Comment: > > > >Groups within groups are not supported in QuickForm 3. > > > > > >Previous Comments: > >------------------------------------------------------------------------ > > > >[2006-01-17 16:53:50] marques at displague dot com > > > >Description: > >------------ > >When you display a form, with a group within a group (as the first > >element, at least), the grouped element will be duplicated, appearing > >before and after the other elements. > > > > > > > >A var_dump of the $form object shows everything seemingly in place (no > >dupes) - I think the culprit is the group handling part of > >renderElement in the 'Default' Renderer. > > > >Test script: > >--------------- > >$g = array(); > > > >$g[] = HTML_QuickForm::createElement('checkbox',...); > > > >$g[] = HTML_QuickForm::createElement('select',...); > > > >$gObj = HTML_QuickForm::createElement('group',...,$g); > > > > > > > >$form->addGroup(...,array($gObj,[checkboxa],[checkboxb])); > > > > > > > >$form->display(); > > > > > > > >Expected result: > >---------------- > >[checkbox] [select] > > > >[checkboxa] > > > >[checkboxb] > > > >Actual result: > >-------------- > >[checkbox] [select] > > > >[checkboxa] > > > >[checkboxb] > > > >[checkbox] [select] > > > >------------------------------------------------------------------------ > > > > > > > > > > > -- > Marques Johansson > marques@displague.com > > -- > PEAR QA Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Justin Patrin

« previous php.pear.qa (#3387) next »