The following method allows you to add confirmation email address field in your customer registration or newsletter page.

Create a javascript file called validation.js under “js/email/validation.js”

[php toolbar=”true” classname=”one_line”] Validation.addAllThese([

[‘validate-cemail’, ‘Please make sure your emails match.’, function(v) {
var conf = $(‘confirmation’) ? $(‘confirmation’) : $$(‘.validate-cemail’)[0];
var pass = false;
var confirm;
if ($(’email’)) {
pass = $(’email’);
confirm =conf.value;
if(!confirm && $(’email2′))
confirm = $(’email2′).value;
return (pass.value == confirm);

Add the new js file into your customer.xml file

[php toolbar=”true” classname=”one_line”] <reference name="head">
<action method="addJs"><script>email/validation.js</script></action>

On the register form add a new field to contain the email confirmation field “template/customer/form/register.phtml”.

[php toolbar=”true” classname=”one_line”] <label class="required" for="email_address"><em>*</em>CONFIRM EMAIL</label>
<div class="input-box"> <input class="input-text required-entry validate-cemail" title="Email Address" value="" id="email2" name="email2" type="text">


  1. November 17, 2019 at 11:04 am

    Добрый день
    Недавно я нашёл отличную публикацию с сайта,не реклама

    итальянские бренды


  2. admin-Reply
    November 28, 2019 at 8:00 am

    Thank you @TaxisHib

Leave A Comment