I have created a form with several fields. To check if the fields are filled, I have placed several checks if the DocClose event. This creates a messagebox containing text of the missing fields. This will only popup when the pdf is closed. See below for a part of the Java-script.
-----------------------------------------------------------------------------------------------------------------
var errmsg = ""
if (Form.Page1.CompanyName.rawValue == null)
{errmsg = errmsg + "CompanyName is not filled in";}
if (Form.Page1.CompanyStreet.rawValue == null)
{errmsg = errmsg + "\n";
errmsg = errmsg + "CompanyStreet is not filled in";}
if (errmsg !== "")
{xfa.host.messagebox (errmsg, "Please note!",1,0);}
else
{}
-----------------------------------------------------------------------------------------------------------------
This works just fine in Adobe Acrobat and in Adobe Reader. However,the user needs to be able to save a local copy. So, I use Adobe Acrobat 9 Standard to "Extend Forms Fill-In & Save in Adobe Reader". After this change, when this PDF is opened in the Reader or in Acrobat, the messagebox runs twice! The first time as it should, but the second time, it
I also noticed that the Script language of this part has changed from Java to mixed.
Thanks for any help!
Erik