This code will allow you to populate the cardholder name with the billing first and last name.
<script> function copyNameToCardholder() { var form = document.epayform; var first = form.UMbillfname.value; var space = " "; var last = form.UMbilllname.value; var cardfirst = first.concat(space); var cardholder = cardfirst.concat(last); form.UMname.value= cardholder; } </script>
<tr> <td bgcolor="#F0F0F0" width="234" align="right"><font face="Verdana" size="2">First Name:</font></td> <td bgcolor="#F0F0F0" width="450"> <input type="text" name="UMbillfname" size="20" value="[UMbillfname]"></td> </tr> <tr> <td bgcolor="#F0F0F0" width="234" align="right"><font face="Verdana" size="2">Last Name:</font></td> <td bgcolor="#F0F0F0" width="450"> <input type="text" name="UMbilllname" size="27" value="[UMbilllname]"></td> </tr>
Becomes:
<tr> <td bgcolor="#F0F0F0" width="234" align="right"><font face="Verdana" size="2">First Name: </font></td><td bgcolor="#F0F0F0" width="450"> <input type="text" name="UMbillfname" size="25" value="" onChange="copyNameToCardholder()"></td> </tr> <tr> <td bgcolor="#F0F0F0" width="234" align="right"><font face="Verdana" size="2">Last Name: </font></td><td bgcolor="#F0F0F0" width="450"> <input type="text" name="UMbilllname" size="25" value="" onChange="copyNameToCardholder()"></td> </tr>
Remove the cardholder textbox:
Lastly add UMname to the hidden input section by finding this:
<input type="hidden" name="UMcommand" value="[UMcommand]"> <input type="hidden" name="UMamount" value="[UMamount]"> <input type="hidden" name="UMtax" value="[UMtax]"> <input type="hidden" name="UMinvoice" value="[UMinvoice]"> <input type="hidden" name="UMcustid" value="[UMcustid]"> <input type="hidden" name="UMrecurring" value="[UMrecurring]">
And adding a this line:
<input type="hidden" name="UMname" value="">