>
> After the form is validated, if it is successful, there are other
functions
> I would like it to call. For example, I want to disable the "Submit"
button
> after it is pressed, as to prevent duplicate submissions. Is there a way
to
> do this using form validate?
>

Currently you cannot add custom JavaSCript code to the form validation. It's
planned for the future. For now you can define your own validation type (see
Embperl/Form/Validation/Number.pm for an example) and call your JS code from
there.

> My form has several confirmation fields. Is there anyway to add logic to
> form validate so that it checks to see if two form fields are equal, and
if
> not, generates an error?
>

Yes, but you need the CVS version of Embperl. Use the "same" keyword. Here
is an example for a password entry:

    $rules = [-key => 'pass', -name => 'CA Kennwort', required => 1,
length_min => 4,
        -key => 'cpass', -name => 'Kennwort', required => 1, length_min =>
4,
       -key => 'cpass2', -name => 'Kennwortwiederholung', required => 1,
length_min => 4,
        same => 'cpass:Kennwort',
        ] ;

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to