Re: DB_Table QuickForm rules
| From: | Mark Wiesemann | Date: | Thu, 20 Apr 2006 12:16:28 +0000 |
| Subject: | Re: DB_Table QuickForm rules | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23765@lists.php.net to get a copy of this message | ||
Hi Charlie,
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.)
Regards,
Mark