Data lost when Acrobat form is saved

Posted on 2004-11-07
Last Modified: 2009-12-16
When I open up a fill-in form, input data, and then save it under a new name, it appears that the saved form retains the data input. However, when that form is closed and reopened, the data disappears. This problem only appears when I have custom javascript in the form; using the calculation tab to add up fields doesn't result in a loss of data, when saved.

The form in question is at

If you download this form to your desktop, use some of the dropdown boxes to input data, and then save the form, the data will disappear when the form is reopened.

Any thoughts?

I am using Acrobat Professional 6.0, so it is not a matter of the Reader not being able to save.

Thank you.
Question by:goodmorals
    LVL 44

    Accepted Solution

    In the global JavaScript "Recalculate01" you call this.resetForm(). This sets all fields back to their default value, which for the combo boxes is the empty string. I think I remember that you had to use this to get a certain behavior, but don't remember what the exact reason was.
    LVL 44

    Expert Comment

    by:Karl Heinz Kremer
    OK, I just looked through your old questions and came across the one where I suggested to use the resetForm() call ( We did this to reset the form so that the two buttons for the status code were both unselected. Using the resetForm() function was the most straight forward, and would work if you submitted the form via the web, but if you want to open a filled out form directly in Acrobat we need to come up with a different mechanism for this.

    The requirement is that the status code buttons are all reset, but that we do this only the first time the form is opened, and not when an already filled out form is reopened.

    Your combo boxes seem to have  default value of " " (one space), assuming that for a filled out form, the first combo box would be set to something different than the default, you could replace the call to this.resetForm() in Recalculate01 with this:

    if (this.getField("Cred.1").value == " ")

    This will only reset the form if the Cred.1 field returns just one space. If it's possible to have the form filled out, but the Cred.1 combo box is still set to the default, you need to come up with a different condition that you can test for.

    Author Comment

    In the question above, resetForm() was used to return the radio buttons to default state when the form loaded.

    Is there any way to solve the "no save" problem and yet still be able to have the radio buttons reset to default values in a new form?
    LVL 44

    Expert Comment

    by:Karl Heinz Kremer
    You are too quick :-)

    Author Comment

    That works great. We always have Cred.1 filled in, if there is any data in the form.

    Thanks again for a great solution.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe INTRODUCTION This Article is a follow-up to the Article entitled How To Rename-Move a Batch of PDF Files Based o…
    PaperPort is a popular document imaging/management product from Nuance Communications ( It is in widespread use by both individuals ( and businesses (http:/…
    Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
    We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now