Copying a field's value to other fields
In some cases, you may need to use a value entered into one field as the default value for another field. For example, an email address is likely to be reused as a login name. To achieve this, you can implement the onblur handler for the email field. Enter the following JavaScript code:

if (form.loginName && form.loginName.value=='') form.loginName.value=this.value;
This code first verifies that the loginName field exists in the current form and has no value specified by the user.
You can use the prefix form in front of any field integration
name to reference that field in the DOM. For example, in the above code we reference the
loginName field as form.loginName.