I have a fillable form that is Reader Extended (so it can be saved from Adobe Reader). After a user fills in the form, he clicks a submit button that sends a data stream to a servlet. The servlet embeds this data as XML in another version of the form, converts the form to be PDF/A compliant, and returns the new PDF/A form with embedded data. That all works fine when the fillable form was open in either Reader or a web browser. But if the user has the fillable form open in Acrobat when he clicks the submit button, the embedded data is stripped out of the PDF/A form that's returned by the servlet.
It's not a problem if the user fills in the data while the form is open in Acrobat, as long as he closes the form and opens it in Reader or a web browser before clicking the submit button.
Is there a way to detect if the fillable form is open in Acrobat (perhaps in the preSubmit event?) so I can display a message warning the user to save and close the form, and then open it in Reader or a web browser before clicking the submit button?