I have a Adobe document that I enter the three digit social security number in 3 fields and then combine those into one field for later use further along in the document. I use the following Java script:
`var three = this.getField("Social Security");
function collatePreSetFieldsTo(populate){
//always overwrite the value in populate field
//if(populate.value==''||populate.value==null){
var one = this.getField("SSF");
var two = this.getField("SSM");
var three = this.getField("SSL");
populate.value=one.value + '-' + two.value + '-' + three.value;
//}
}
collatePreSetFieldsTo(three);
`
This works except for the fact that if one of the numbers contain a zero at the beginning. It then drops the zero. I have tried to add to the variable statements "toString() " and "AsString" and every other thing that the internet has suggested. Nothing is working and was wondering if anyone has any suggestions on what I might be doing wrong. I am using Adobe X Pro. Thanks.