Re: QuickForm: group elements and removeElement

From: Date: Thu, 25 Sep 2003 20:20:08 +0000
Subject: Re: QuickForm: group elements and removeElement
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8049@lists.php.net to get a copy of this message
I'm only calling addGroup() once and I am using =&. I tried using $form->display() instead of the template renderer and it worked perfectly, so it must be something wrong with my template. I'll have to take a closer look at it tomorrow. Thanks. Bertrand Mansion <bmansion@mamasam.com> 09/25/2003 03:06 PM To: <Julie.L.Knoll@stls.frb.org> cc: <pear-general@lists.php.net> Subject: Re: [PEAR] QuickForm: group elements and removeElement <Julie.L.Knoll@stls.frb.org> wrote : > Thanks for the reply. I tried both methods and neither seemed to work > exactly right. > > The first method that sets the elements after validate() is called doesn't > work because the fields are then missing when I try to add validation > rules. > > The second method worked okay by unsetting the elements except then I got > an extra label on the form: > > Category: > Category: Weekly Releases > > I tried unsetting the elements directly using unset($group->_elements[1]), > and not surprisingly I got the same result. So then I tried having a > group with just one element to begin with and got the same thing again. > Apparently it doesn't like having a group with only one element. I'm > using this with the DynamicIT renderer, so maybe its a problem with that? > > Thanks Again. How many times do you call addGroup() ? Are you sure you used '=&' and not '=' only ? Having one element in a group shouldn't be a problem, I do it all the time for my buttons. Bertrand Mansion Mamasam

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