Re: [QuickForm] Groups within groups

From: Date: Thu, 16 Oct 2003 19:02:27 +0000
Subject: Re: [QuickForm] Groups within groups
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8465@lists.php.net to get a copy of this message
<karhade@yahoo.com> wrote : > Hi, > > I need to create a group which contains sub-groups. > (The sub-groups have to be created as groups since I > need to validate them as groups.) Is this possible? No, this feature is not available at the moment, it is really difficult to implement. And, most of the time, there are workarounds. > I would like to use the dynamic renderer since there > are a few different types of such groups that have to > be rendered slightly differently. How would I go about > creating the dynamic.html file? Should I have a > {qf_group} block that contains another {qf_group} > within the group element loop? (In the example there > is a {qf_block} that contains simple element types > inside the group element loop like {textarea}, > {radio}, etc.) Or should I name the outer and inner > groups differently if having group inside a group is > illegal? Or is creating a new custom element the way > to go? I am not exactly sure about which way to go. You can of course create your own custom element that extends HTML_QuickForm_Group. This was done in the date and hierselect elements. You can also try to avoid groups in groups by using different names for your elements such as group1_el1, group1_el2, group2_el1, group2_el2... It all depends on what exactly you are trying to do. HTH Bertrand Mansion Mamasam

« previous php.pear.general (#8465) next »