Re: QFC - Register Rule
| From: | Barry Steele | Date: | Thu, 20 Nov 2003 07:33:08 +0000 |
| Subject: | Re: QFC - Register Rule | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9050@lists.php.net to get a copy of this message | ||
Sorry
After the above you get
<code>
$this->registerRule('checkBoxExpl','function','getCheckBoxExplanationRule');
$this->registerRule('checkRadioExpl','function','getRadioExplanationRule');
$this->addRule('incLocation','Please add explanation as
required','checkRadioExpl',getExplFlds(getReferences($db,'Location')));
$this->addRule('incType','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'Type')));
$this->addRule('incContFactorType','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'ContFact')));
$this->addRule('incInjuryNature','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'InjuryNature')));
$this->addRule('incBodyPart','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'BodyPart')));
$this->addRule('incReferral','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'Referral')));
$this->addRule('incOtherServices','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'Service')));
$this->addRule('incTreating','Please add explanation as
required','checkBoxExpl',getExplFlds(getReferences($db,'Treating')));
</code>
I assumed that you'd believe me on that one :-)
Sorry,
Barry
On Thu, 2003-11-20 at 18:17, Alexey Borzov wrote:
> Hi!
>
> Barry Steele wrote:
> > Now I want to call it from a page in qfc, I used the following
> >
> > // <code>
> > require_once "misc.php";
> >
> > class IncidentPage extends HTML_QuickForm_Page
> > {
> > function buildForm()
> > {
> > // blah - build fields
> >
> >
> > $this->registerRule('checkBoxExpl','function','getCheckBoxExplanationRule');
> >
> >
> > $this->registerRule('checkRadioExpl','function','getRadioExplanationRule');
> > }
> > }
> > // </code>
> >
> > This is wrong because it never gets called - should I include all of
> > these functions in a parent form and sub-class that into QFC?
>
> I don't see any addRule() calls here. How do you expect the methods to be called?
hpfm
Barry Steele
hpfm solutions pty ltd
mob: 0413947980
fax: 0299817727
mailto:: barry@hpfm.biz