Re: Quickform Rules
| From: | Bertrand Mansion | Date: | Mon, 10 Jun 2002 09:49:37 +0000 |
| Subject: | Re: Quickform Rules | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1616@lists.php.net to get a copy of this message | ||
le 10/06/02 11:24, Birgir Stefansson à bs@hi.is a écrit :
> Hi. I've been playing around with the quickform class and used it to
> create several forms for myself. I've had some problems with the rules
> and was wondering if anyone could shed some light on the following
> things:
>
> 1) When I set a single rule for a single field to be of type "email" it
> seems as if that field becomes "required" too. So not filling out this
> field is invalid even though I want it to be optional, that it has to be
> a valid email or blank. Adding some rules for the _other_ input fields
> "email" works as expected.
>
> 2) When I submit the form and there is an error in the input all the
> fields are reset to blank. How do I keep fields that are valid so a user
> doesn't have to input all fields again ?
>
> Thanks.
> Birgir Stefansson
Could you send me some of your code especially for example 2.
I will try to fix this.
Bertrand Mansion
Mamasam
PS: I go to Iceland this summer for a 2 weeks trek from 20 August to 4
September. How is the weather there at this period ?