Jump to content

Confirm password


CJH

Recommended Posts

In Prestashop 1.5 I had an edited theme page for authentication.tpl to produce a second email entry for confirmation of password - if the two entries did not match, it returned an error and told the customer to try again. The code I used (not my code writing - I don't know how and I don't now know where I got it from) was:

 

        <p class="required password">
<label for="passwd_confirm">{l s='Confirm password'} <sup>*</sup></label>
<input type="password" class="text" name="passwd_confirm" id="passwd_confirm" />
</p>
<script type="text/javascript">
$(function(){ldelim}
$("#passwd_confirm").parents("form").submit(function(){ldelim}
if ($('#passwd').attr('value') == $('#passwd_confirm').attr('value'))
return true;
alert("{l s='Your passwords do not match: please try again'}");
return false;
{rdelim});
{rdelim});
</script>

 

But it does not work in Prestashop 1.6 (it produces a syntax error). Neither do the other suggestions in 1.5 forum topics that I have found.

 

Can the above be modifed to work? Or else, how can I add a password confirmation field?

Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...