Copy link to clipboard
Copied
Greetings:
I am working on an employee on-boarding packet with fillable fields and QR codes for scanning into our document managemet system.
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];
}
}
}
Copy link to clipboard
Copied
Info: flattenPages flattens all form fields.
Copy link to clipboard
Copied
Bernd:
Thank you for your response.
FlattenPages is not the correct command in this instance as I need to keep approximately 60% not only unflattened; I need them to be fillinable so my new EE can take the document over and finish completting it. The QR code is calculated with only the seed data initially collected.
Mari
Copy link to clipboard
Copied
In your script you use flattenPages.
Copy link to clipboard
Copied
Bernd:
I understand that. My issue is I only want to flatten a select few, which I can do, while leaving the rest fillable for my user. I am trying to focus on just the QR code field to stop it from calculating. As once I enter data in a user fillable field it autocalculates.
I am seeking assistance on flattening the QR code field specifically.
Thank you.
Copy link to clipboard
Copied
You can remove the calculation script.
Copy link to clipboard
Copied
Bernd:
I am really new at this. Could you expand a bit, perhaps a lotta bit. The only way I have the code I attached is my perservance of searching the web; please dont misinterpret my coding capability. Thank you!
Mari
Copy link to clipboard
Copied
It would be worth troubleshooting this to find out why certain fields are not getting flattened. I don't see anything in the code that would prevent it, and I am able to flatten bar code fields without a problem. Are there any errors shown in the JavaScript console (Ctrl+J)?
Copy link to clipboard
Copied
George:
Thank you so much for your response. I was able to circle back around to this challenge of mine.
I am getting an error code on the console that I am hoping you may have some insight.
At this point my code is no longer valid which is why I think I am not flattening my QR code.
Any insight you can add would be great; thank you.
Mari
Copy link to clipboard
Copied
I would start by checking the console for errors immediately after you lock down the fields. If there are no errors, are any of the QR code fields getting flattened?
Copy link to clipboard
Copied
Perhaps I should back. How would I know it is flattened? Does it look different? I am not trying to be smart; your question made it dawn on me I may not know what I am looking for.
I receive no console errors after I select the 'lock down completed fields' button. and my fields are flatten. The employee information fields are flattened with the emergency contact information to be completed after the QR codes are flattened.
Copy link to clipboard
Copied
George:
I was able to work it all out. thank you for your assistance.
Mari