Hi everyone. I am new here, and I think I am going crazy. I'm trying to do something that should be simple, but everything I've googled and tried has come up fruitless.
I need to have two fields auto propagate into a third separated by a hyphen.
For example, end user fills in form field one with "Name", form field two with "Occupation", I need the third form field to display "Name-Occupation". This should be simple, no?
I'm a bit new to javascript. This is what I wrote under custom format script:
var name;
name=this.getField("Name");
var occupation;
occupation=this.getField("Occupation");
document.write(name);
document.write="-";
document.write(occupation);
What am I doing wrong? I'm on a bit of a deadline, this has to be completed tomorrow. Any advice is much appreciated. Thanks!
You can use the following "Custom calculation script" to concatinate two fields:
You might want to add additional code for either or both fields are empty.
See [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=18439]Combine into 1?[/url] for a more generalized solution that includes code for handling missing data.
George Kaiser