Hello, Everyone
I am new for this scripting. My question is:
How to block the 'save' function when the required fields are not filled?
I designed a PDF file with some required fields and I do not want the user to save the document until all required fields are filled. My idea is to write some scripts in Willsave method like:
if (this.getField("Family Name").value == ""){
app.alert('You should fill the Family Name field firstly!');
}
But I do not think it works as finally the document is saved after all.
Please help me on that!
So much thanks.
if (this.resolveNode("yourFiledName").rawValue == null){
xfa.event.cancelAction = true;
xfa.host.messageBox('You should fill the Family Name field firstly!');
}