Copy link to clipboard
Copied
I want to use the values from a "first name" and "last name" to populate another field called "full name" (with spaces between the two fields).
I found the below script, but my javaScript skills are lacking and I don't know how to add extra values:
event.target.value =
this.getField("first name").value;
I am seeking guidance on how to add more than one field. I would greatly appreciate your assistance.
FYI, this is the original post I credit the above script to.
Copy link to clipboard
Copied
Use this as 'Custom calculation script' of "full name" field:
var first = this.getField("first name").valueAsString;
var last = this.getField("last name").valueAsString;
if(first&&last)
event.value = first+" "+last;
else
event.value = "";