So I've been trying to add "Confirm Email" field to my registration page.

I'm using these two pages as references:

However for some reason, I can't get it to show up.

I've added this to customer.xml

<action method="addJs"><script>email/validation.js</script></action>

This to validation.js

['validate-cemail', 'Please make sure your emails match.', function(v) {
  var conf = $$('.validate-cemail')[0];
  var pass = false;
     if ($('email')) {
     pass = $('email');
  var emailElements = $$('.validate-email');
  for (var i = 0; i < emailElements.size(); i++) {
  var emailElement = emailElements[i];
     if (emailElement.up('form').id == conf.up('form').id) {
     pass = emailElement;
    if ($$('.validate-admin-email').size()) {
    pass = $$('.validate-admin-email')[0];
    return (pass.value == conf.value);

And this to register.phtml

<label for="confirm_email" class="required"><em>*</em><?php echo$this >_('Confirm Email Address') ?></label><div class="input-box"><input type="text" name="confirm_email" title="<?php echo $this->__('Confirm Email') ?>" id="confirm_email" class="input-text required-entry validate-cemail" /></div>
  • 1
    Which register.phtml are you talking about ? The base theme includes a layout file called persistent.xml in which different templates are replaced by those in the template folder persistent. In the second link they are giving, they are speaking about the good template file, but in the first one, the "wrong". I guess it is something that wasn't existing at the time it was written. – hellimac Aug 12 '15 at 3:29
  • I am indeed using the register.phtml inside the persistent folder. However, it isn't the exact one they provided in the link, since the one they provided contains no register.phtml. /app/design/frontend/base/default/template/persistent/customer/form is where the one I edited came from, since /app/design/frontend/ultimo/default/template/persistent/customer/form/register.phtml doesn't exist. – taskle Aug 12 '15 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.