Copy link to clipboard
Copied
Hello all!
Does anyone know why when I hit the "submit completed form button" on my form it clears the data in only those text fields that I have indicated to be masked or have checked as "Password" under the property options?
For example, I had some users testing a form I just recently created and they let me know that every time they try to submit the form via the submit button they keep getting the warning pop-up displaying there is still required text fields not completed/or filled in with a value even though they did enter and complete those fields. Noticed that all these text fields where this appears to be happening are coincidentaly only those which I indicated in the text field properties to be masked just because the data can be considered somewhat sensitive.
Additionally those testing the form detailed that after closing that popup message, going back and re-entering the requested data in those fields, then try and hit the submit form button again, the same popup message displays again regarding thpse same required text fields need to be completed before submitting form and it the data in only those specific masked text fields appear to have been cleared once again. I should add the same thing occurs when they attempt to just even save the PDF form to desktop that again the data in those fields goes missing or is cleared.
If helpful, the way I masked those fields was by going into the text field properties and checking the "Password" box. And I did this same masking for 7 total text fields.
Additionally, even though I dont think this is the reason for issue, but I do also have an app alert javascript in the actions tab of the properties for the "Submit Completed Form" button field which purpose was to customize the displayed message in the warning pop-up which specific fields the user needs to go back and complete.
Anyways hoping its an easy fix or explaination, if anyone has either I would really appreciate! Thanks!
Copy link to clipboard
Copied
What script does you use?
Copy link to clipboard
Copied
var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if (f.type!="button" && f.required ){
if (f.type!="button" && f.valueAsString==f.defaultValue)emptyFields.push(f.name);
}
}
if (emptyFields.length>0) {
app.alert("OOPS! It looks like you missed entering required information before you can submit this form! PLEASE GO BACK AND ENTER THE REQUESTED INFORMATION FOR THE FOLLOWING FIELDS:\n" + emptyFields.join("\n"));
}
Copy link to clipboard
Copied
Where does you submit the form? I see only the test of required fields.
Copy link to clipboard
Copied
They have it as a separate action... I told them to do it using a script in a recent reply, but I guess they decided not to listen to my advice.
Copy link to clipboard
Copied
My mistake! I have an original copy of the form open at same time of a beta testing form where I added the submit script based on @try67 help and I copied and posted wrong one.
Below is the current script I have in my testing form to submit:
var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if (f.type!="button" && f.required ){
if (f.type!="button" && f.valueAsString==f.defaultValue)emptyFields.push(f.name);
}
}
if (emptyFields.length>0) {
app.alert("OOPS! It looks like you missed entering required information before you can submit this form! PLEASE GO BACK AND ENTER THE REQUESTED INFORMATION FOR THE FOLLOWING FIELDS:\n" + emptyFields.join("\n"));
}
else this.mailDoc({cTo: "me@server.com"});
However even when testing with the additional submit script in the submit button, the masked fields data is still clearing/deleting when attempting to submit the form or even when just attempting to save the pdf with the masked field data that was entered it is also clearing those specific fields as well?
Copy link to clipboard
Copied
Can you share the form?
Copy link to clipboard
Copied
This explains the issue.