Re: [QuickForm] - Form rules?
| From: | Mark Steudel | Date: | Mon, 23 Apr 2012 22:46:26 +0000 |
| Subject: | Re: [QuickForm] - Form rules? | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-31540@lists.php.net to get a copy of this message | ||
This was a earlier email conversation from Alexey:
Alexey Borzov ✆
12/6/11
to me, pear-general
Hi Mark,
On 06.12.2011 2:31, Mark Steudel wrote:
In the old QuickForm there were form rules. Is there a way to achieve
the same thing in QuickForm2? I want to be able to compare two values
from different form elements.
If you just wish to compare two form elements then you should probably
use the built-in 'compare' Rule. There is an example for that in
builtin-rules.php
If you want to create something similar to old "form rule", you should
subclass HTML_QuickForm2_Rule and implement validateOwner() and
setOwnerError() methods in the child rule. There is no example for
this currently, but it should be straightforward.
On Mon, Apr 23, 2012 at 3:43 PM, Olaf Gleba <list@creatics.de> wrote:
> Hi Mark,
>
> Am 23.04.2012 um 23:44 schrieb Mark Steudel:
>
>> So I ran into this tutorial:
>>
>> http://ericlondon.com/using-pear-library-html-quickform2-create-simple-authentication-form-custom-validation-callback
>>
>> And I noticed that he does implement a form rule using a callback, I
>> was under the impression that form rules didn't exist anymore ....
>
> Do you have any references for your suggestion?
>
> AFAIK form rules are still a main part of what QuickForm2 makes sweet and valuable.
>
> bye
> Olaf
>
> --
>
>
>
>
--
-----------------------------------------
Mark Steudel
P: 425.298.7244
F: 206.260.3021
msteudel@gmail.com
. : Work : .
http://www.mindfulinteractive.com
. : Play : .
http://www.steudel.org/blog
. : LinkedIn : .
http://www.linkedin.com/in/steudel