Forum Moderators: open
<form name="myform" onsubmit="return fillFields();">
And this script to the head of your document:
<script language=javascript>
function fillFields() {
document.getElementById('login').value = document.getElementById('email').value;
}
</script>
Note: my first post had a typo, the getElementById should use a lowercase 'd'.
I want the email-field to be sent to the server as both email and login. (the loginfield should not be visible in the form) and as you can see I also want a verify email field.
Here´s part of the code
From the head:
<script language=javascript>
function fillFields() {document.getElementById('login').value = document.getElementById('email').value;}
</script>
From the form:
<form method="post" action="#*$!" name=pform onsubmit="return fillFields();">
<input type="hidden" name="action" value="#*$!">
<input type="hidden" name="regcode" value="">
<td>Email (used for login):</font><span class="style1">*</span></td>
<td><input name="_email" type="text" size="30"></font></td></tr>
size="30"></td>
<tr><td>Verify e-mail:<span class="style1">*</span></font></td>
<td><input name="_email2" type="text" size="30">
</font></td></tr>
<input type="submit" value="Send"></div></td></tr>
</table>
<FORM ... >
<INPUT type="hidden" name="login" ... >
...
<INPUT type="text" name="email" ... >
...
</FORM>
1) in the FORM tag:
<FORM ... onSubmit="this.login.value=this.email.value; return true;">
2) in the INPUT tag:
<INPUT name="email" ... onChange="this.form.login.value=this.value;">