[ic] Comparing form fields

Lyn St George lyn at zolotek.net
Fri Sep 10 14:00:31 EDT 2004


On Fri, 10 Sep 2004 17:37:46 +0100, Jamie Neil wrote:

Hi Jamie

>Can anyone suggest a way that I can compare two submitted form fields to 
>see if they match and then set mv_nextpage according to the result? I'm 
>asking the user to type in a password and confirmation and I want to 
>return to the same page with an error if they don't match.

This snippet is taken from working code:
[if type=explicit compare=`$CGI->{newpass} ne $CGI->{newpass2}`]
<font color=red>Passwords do not match.</font>&nbsp;
[tmp fail]1[/tmp]
[/if]

where the password fields are named 'newpass', 'newpass2'. 

>Looked at form profiles but couldn't see a way of accessing the 
>submitted form values at that stage.
>
>Tried mv_click/check but can't see how to return an error in the same 
>way that form profiles do.
>
>Don't want a javascript solution.
>
>Any ideas?
>
>-- 
>Jamie Neil | <jamie at versado.net> | 0870 7777 454
>Versado I.T. Services Ltd. | http://versado.net/ | 0845 450 1254


-
Cheers
Lyn St George
+---------------------------------------------------------------------------------
+ http://www.zolotek.net .. eCommerce hosting, consulting
+----------------------------------------------------------------------------------



More information about the interchange-users mailing list