Re: Re: QF rules as notices
| From: | André Temme | Date: | Thu, 22 Apr 2004 09:09:49 +0000 |
| Subject: | Re: Re: QF rules as notices | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12014@lists.php.net to get a copy of this message | ||
> This can't be done with quickform, rules are not "optional".
Hello Aidan, hello list,
is there really no possibility? I thought about different ways how this
could be done:
a) Additional parameters for addRule(). If I do print_r($form), the array
_rules shows some keys which seem not to be used or which could be supplied
with a further value to keep track of notices?
b) To validate the form I use
if ($form->validate())
{
$form->process('process_data', false);
return;
}
Maybe at this point sth. could be added so that notices don't return false
for $form->validate(), maybe with an additional parameter to validate()?
c) The documentation says:
"Since release 3.2 all builtin validation is performed by subclasses of
HTML_QuickForm_Rule class. You can create your own subclass of it and
implement validate() and getValidationScript() methods."
Maybe this would be the proper way to fulfill my needs?
Any other suggestions?
Best regards,
André
> > Hello,
> >
> > I'd like to to add kind of notices to my form.
> >
> > If the user submits a value in a field for which this notice is valid,
> the
> > notice should be displayed after the first submit.
> >
> > If the user decides to "ignore" the notice he can now submit.
> >
> > As long as there are real errors added by addRule(), the form shall be
> > displayed with the messages from the errors and the messages from the
> > notices.
> >
> > Can this be done? How? :-)
> >
> > Thanks in advance for helping,
> > André Temme
--
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info