• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Masked text field data is not saving and getting clearing when attempting to submit completed form?

Explorer ,
Aug 25, 2021 Aug 25, 2021

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.

 

Anthony5E5C_4-1629917558356.png

 

 

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.

Anthony5E5C_1-1629917097631.png

 

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!

TOPICS
Create PDFs , Edit and convert PDFs , General troubleshooting , How to , JavaScript , PDF forms

Views

405

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2021 Aug 25, 2021

Copy link to clipboard

Copied

What script does you use? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 25, 2021 Aug 25, 2021

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"));
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2021 Aug 25, 2021

Copy link to clipboard

Copied

Where does you submit the form? I see only the test of required fields.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2021 Aug 26, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2021 Aug 26, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2021 Aug 26, 2021

Copy link to clipboard

Copied

LATEST

Can you share the form?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2021 Aug 26, 2021

Copy link to clipboard

Copied

This explains the issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines