Home > Archive > PHP Pear > January 2005 > Re: [PEAR] DB_DataObjectFormBuilder - $fb_preDefGroups
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] DB_DataObjectFormBuilder - $fb_preDefGroups
|
|
| Justin Patrin 2005-01-05, 3:58 pm |
| 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');
--
Justin Patrin
| |
| Jacob Singh 2005-01-17, 3:57 am |
| Justin Patrin wrote:
> On Wed, 05 Jan 2005 18:20:55 +0530, Jacob Singh <jacob@pajamadesign.com> wrote:
>
>
>
> 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....
throw me a line if you have time.
Thanks
Jacob
|
|
|
|
|