Re: Re: DB_Table QuickForm rules

From: Date: Thu, 20 Apr 2006 19:11:58 +0000
Subject: Re: Re: DB_Table QuickForm rules
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23774@lists.php.net to get a copy of this message
On 4/20/06, Charlie van de Kerkhof <pear@mowd.nl> wrote: > On 20 Apr 2006, at 14:16, Mark Wiesemann wrote: > Hi Mark > > > > I only had a quick look at your code -- but: > > > >> $oBet =& new Bet($G_DB, 'bet', 'safe'); > >> $G_FORM = new HTML_QuickForm('lab', 'post', '', > >> '', ''); > >> > > Instead of using the second line of the code snippet from above > > $G_FORM =& $oBet->getForm(null, null, array('formName' => > > 'lab')); > > should do the trick as this also calls addRules() in > > Table/QuickForm.php. ('post' is not specified in the $args array > > because > > DB_Table uses 'post' as the default value for the method option of > > QF.) > > > > But I don't want the whole form be the same elements. Some of them I > want to be grouped and there has to be a couple of other hidden input > elements present in the form. So to my knowledge getForm() is not an > option. > > Do you have another suggestion? > You can always get the form then add hidden fields to it. That shouldn't be any problem at all. -- Justin Patrin

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