[ic] comparing two form values with a profile

Paul Jordan interchange-users@interchange.redhat.com
Tue Mar 5 17:54:01 2002


Hi guys

I added a RETYPE EMAIL: input in checkout.html. I named it "email2". I am
trying to get profiles.order to check and see if it equals what the customer
typed in the existing "email" input.

In profiles.order, under the credit_card section I have tried:

email2=required [if type=value term=email op="!~" compare="[value
email2]"]email addresses are different[/if]
------------------

email=email
... # may be more checks here
[if type=value term=email2 op=ne compare="[value email]"]
[value name=email2 set'']
email2=required Email2 does not match email.
[/if]
... # may be more checks here
&fatal = yes
------------------

email=email2 Email addresses don't match
------------------

and a myriad of other attempts, (I always apply changes) but none of them
work. The first two work to the point if there is NO value entered into
email2 field. BTW This has to work whether a user is logged in or not.

There is no place in the docs that explain the limitations of profiles
beyond "required". I see other operations in there, so it leads me to
believe it may be possible.

Has anyone ever had to compare two form values with a profile? If so, can
you send me some hints, or tell me if it is even possible.

Thanks in adavnce

Paul Jordan