I figured it would be possible to take the two value's and combine them by sitcking them into a hidden field.
I found a script online and due to my very limited knowledge of javascript I wouldn't actually know what to do with this and it looks looks somewhat incomplete:
Quote
<script language=javascript>
funtion populate(){
Fname = document.form1.FirstName.value;
Lname = document.form1.LastName.value;
document.form1.CONTACT.value = Fname + " " + Lname;
}
</Script>
Then call the function with onchange on your lastname field <input ID="LastName" value="" onChange="populate()"
funtion populate(){
Fname = document.form1.FirstName.value;
Lname = document.form1.LastName.value;
document.form1.CONTACT.value = Fname + " " + Lname;
}
</Script>
Then call the function with onchange on your lastname field <input ID="LastName" value="" onChange="populate()"
I'm completely full of cold at the moment so my brains not firing on all thrusters.
Would this require any library like jquery to work?
If there's a way to do this without javascript that would be even better. Thing is as the forms being submitted via a thirdparty api I don't have the luxury of combining them via PHP at form submission.
Appreciate any help.
Many thanks.
Alex







