Stopping the calculation of a QR code
Greetings:
I am working on an employee on-boarding packet with fillable fields and QR codes for scanning into our document managemet system.
- I have a seed page that captures name, address, etc of the new employee (completed by the HR Representative). These fields are repeated throughout the document and autopopulate becuase I use the same field names for each field; ie I have 3 FirstName fields, 3 LastName fields, etc..
- Information from the seed page is used to calculate QR codes with metadata for ultimate scanning into our document management system.
- Once the seed data is complete, I selectively flatten (the HR representative selects a button which performs the function) the repeating fields throughout the document so they can not be modified further. I also, or so I thought, flattened my QR codes, so it would maintain the image first created.
- I thought I had flattened the QR code as I included the field name in my list of fields to be flattened.
- As soon as my new employee types in anything the QR code changes back to its original state as the data from the seed page no longer exists since it is in a flattened state.
My goal is to stop the QR code from recalculating once the seed data is complete and the fields are flattened. Once flattened, the document is turned over to the new employee to complete filling it out.
I have included a list of my code. I took out some of the 'fields to be flattened' so it wouldnt be quite so long. I appreciate any assistance.
Thanks M
___________
var list = new Array();
list = [ //fields to be flattened
"TodaysDate",
"EmployeeID",
"SSN",
"Last4SSN",
"First",
"Middle",
"Last",
"PrefName",
"SiteLocation",
"HireDate",
"StreetAddress",
"StreetCity",
"StreetState",
"StreetZip",
"QR_HealthInsSel",
"QR_STSIGEnroll",
"QR_HRA_HSASel",
"QR_COBRA",
"QR_HepB",
"QR_DirectDep",
"QR_DeferredPay",
"QR_W4",
];
var fields = new Array;
for (var i = 0; i < this.numFields; i++) {
fields[i] = [
this.getNthFieldName(i),
this.getField(this.getNthFieldName(i)).display
];
this.getField(fields[i][0]).display = display.noPrint;
}
for (var i = 0; i < list.length; i++) {
this.getField(list[i]).display = display.visible;
}
this.flattenPages({
nStart: 0,
nEnd: this.numPages - 1,
nNonPrint: 1,
});
for (var i = 0; i < this.numFields; i++) {
for (var j = 0; j < fields.length; j++) {
if (fields[j][0] == this.getNthFieldName(i)) {
this.getField(this.getNthFieldName(i)).display = fields[j][1];
}
}
}
