concatenating values from two fields into one field
Hi everyone,
I have two text fields at the top of my form for the user to type in their first and last names. I originally set the two fields to be global so that when I placed two identically named fields in the footer the values would automatically be repeated in that area across the document. This has worked but I've since decided though that instead of having two separate read only fields in the footer, I'd like to run some javascript so that the combined first and last names will be entered into one field only.
I put the following code on the text field in the footer:
var first = student-info.firstname.rawvalue;
var last = student-info.lastname.rawvalue;
Concat(first, Space(1), last);
This hasn't work though.
My knowledge of javascript is quite limited so I wondered if someone could tell me where I've gone wrong in the code?
Appreciate any assistance.