Auto Populated Fields do not Update/Populate after making a correction to field
Example:
We have a employee name field throughout the document:
Employee Name_1 on page 1
Employee Name_2 on page 2
Employee Name_3 on page 8
Employee Name_4 on page 10
So the script is on the first Employee Name_1, and it works fine. Type your name and the three other fields populate like magic.
Save the PDF, go get a coke or potty break.
Open the saved PDF and you see a typo on the Employee Name_1 field, so you correct. Ah, now it doesn't auto populate the rest of the employee_name fields:
Here is my script:
//set the vars
var one = this.getField("Employees Name_1");
var two = this.getField("Employees Name_2");
var three = this.getField("Employees Name_3");
var four = this.getField("Employees Name_4");
//this function that checks if the destination field is blank and if so popluates it.
function checkAndPopulate(orig,populate){
if(populate.value==''||populate.value==null){populate.value=orig.value}
}
//copy value of one to two, three and four
checkAndPopulate(one,two);
checkAndPopulate(one,three);
checkAndPopulate(one,four);
Not sure where my error my be?
Any help?
thanks,
jr7138
