Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

DocClose event runs twice after extending with user rights

Avatar

Level 2

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

2 Replies

Avatar

Level 10

Can you share your form so I can have a look and see what is happening? You can send it to LievCycle8@gmail.com

Please include a description of the issue as there is no corelation from that email back to this forum.

Paul

Avatar

Level 1

Dear all,

I have the same problem, do you have any solution for this?

Best regards

Fernando