X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add an extra email address field on registration form (https://forum.x-cart.com/showthread.php?t=29825)

lcg 12-09-2011 06:09 AM

Re: Add an extra email address field on registration form
 
Phil, you are the best! Worked for 4.0.18, thanks a million, this is a great mod, much appreciate your sharing and time.

delphi 12-30-2011 09:01 AM

Re: Add an extra email address field on registration form
 
Quote:

Originally Posted by PhilJ
Here's a quick way of doing it, though not strictly validated (v4.1.x) ...

skin1/main/register_contact_info.tpl

after...

Code:


{if $default_fields.email.avail eq 'Y'}


add...

Code:


{literal}
<script type="text/javascript" language="javascript">
function check_email(){
 var theForm = document.forms['registerform'];
 var errMsg = "";
 var setfocus = "";
 if (theForm['email2'].value != theForm['email'].value){
  errMsg = "E-Mail confirmation does not match!";
  setfocus = "['email2']";
 }
 if (errMsg != ""){
  alert(errMsg);
  eval("theForm" + setfocus + ".focus()");
 }
}
</script>
{/literal}


Then after,

Code:


<tr>
<td align="right">{$lng.lbl_email}</td>
<td>{if $default_fields.email.required eq 'Y'}<font class="Star">*</font>{else}&nbsp;{/if}</td>
<td nowrap="nowrap">
<input type="text" id="email" name="email" size="32" maxlength="128" value="{$userinfo.email}" />
{if $emailerror ne "" or ($reg_error ne "" and $userinfo.email eq "" and $default_fields.email.required eq 'Y')}<font class="Star">&lt;&lt;</font>{/if}
</td>
</tr>


and before {/if}

add...

Code:


<tr>
<td align="right">Confirm {$lng.lbl_email}</td>
<td><font class="Star">*</font></td>
<td nowrap="nowrap">
<input type="text" id="email2" name="email2" size="32" maxlength="128" value="" onBlur="check_email();" />
</td>
</tr>



This does not work on Chrome because it pops up a bunch of dialogs and no way to close them ...

Any hint how to fix this?


All times are GMT -8. The time now is 05:56 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.