Re: DB_DataObjectFormBuilder - $fb_preDefGroups

From: Date: Mon, 17 Jan 2005 18:09:24 +0000
Subject: Re: DB_DataObjectFormBuilder - $fb_preDefGroups
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16967@lists.php.net to get a copy of this message
On Mon, 17 Jan 2005 11:55:57 +0530, Jacob Singh <jacob@pajamadesign.com> wrote: > Justin Patrin wrote: > > On Wed, 05 Jan 2005 18:20:55 +0530, Jacob Singh <jacob@pajamadesign.com> wrote: > > > >>Sorry to bug you again Justin, > >> > >>I'm trying to set up a group (creditcard exp Mo. and Yr. > >> > >>So I have two fields accountExpiration_M and accountExpiration_Y. > >> > >>In my DO I declare: > >> > >>var $fb_preDefGroups = array("accountExpiration_M" => "Expiration > >>Date","accountExpiration_Y" => "Expiration Date"); > >> > >>This works fine for rendering, but durring validation I get: > >>MESSAGE: QuickForm Error: nonexistent html element > >>DEBUG INFO: Element 'accountExpiration_M' does not exist in > >>HTML_QuickForm::addRule() > >>CODE: -3 > >> > >>I'm not able to track this down. any Ideas? > >> > > > > > > Try using a group name which has no spaces. This could be the problem. > > To set the display value for it use fb_fieldLabels. > > Ex: > > var $fb_preDefGroups = array('accountExpiration_M' => 'expDate', > > 'accountExpiration_Y' => 'expDate'); > > var $fb_fieldLabels = array('expDate' => 'Expiration Date'); > > > Hi Justin, thanks for all your help. You really are a blessing. I'm > still having an issue, but this time it's because of > > Element 'accountExpiration_M' does not exist in HTML_QuickForm::addRule() > I'm guessing this is because the field is rendered as > ExpirationDate[accountExpiration_M] and FB can no longer find it. But I > didn't mess with the QF object, I used the fb_preDefGroups property and > it did it for me.... Are you sure that's the element name? Did you check your HTML output to make sure? FormBuilder tells QuickForm not to do that... > > throw me a line if you have time. > -- Justin Patrin

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