Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Additional e-mail field for validation. 
 
Boom.dk
Jr. Member
 
Total Posts:  7
Joined:  2009-01-04
 

How would I go about adding a second e-mail field that requires to be identical to the first to the checkout form? I want to make sure that customers are inputting the correct e-mail address.

Thanks in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Boom.dk
Jr. Member
 
Total Posts:  7
Joined:  2009-01-04
 

Sorry to bump, but I really need the help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

This should work, you can add it into a .js file if you want as well

<script type="text/javascript" language="JavaScript">
<!--

function 
BothFieldsIdenticalCaseSensitive() {
var one document.FormName.FieldA.value;
var 
another document.FormName.FieldB.value;
if(
one == anotherreturn true}
alert(
"Oops, both fields must be identical.");
return 
false;
}

function BothFieldsIdenticalCaseInsensitive() {
var one document.FormName.FieldA.value.toLowerCase();
var 
another document.FormName.FieldB.value.toLowerCase();
if(
one == anotherreturn true}
alert(
"Oops, both fields must be identical.");
return 
false;
}

//-->
</script>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Boom.dk
Jr. Member
 
Total Posts:  7
Joined:  2009-01-04
 

Hey!

Thanks for your reply. However, I was thinking if it would be possible using the same script as the rest of the form validation uses. VarienForm or whatever.

Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top