[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Data lost when Acrobat form is saved

Posted on 2004-11-07
Medium Priority
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 goodmorals.org/acrobat.

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
  • 3
  • 2
LVL 44

Accepted Solution

Karl Heinz Kremer earned 1000 total points
ID: 12519143
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
ID: 12519287
OK, I just looked through your old questions and came across the one where I suggested to use the resetForm() call (http://www.experts-exchange.com/Web/Graphics/Adobe_Acrobat/Q_21125614.html). 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

ID: 12519290
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
ID: 12519292
You are too quick :-)

Author Comment

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

Thanks again for a great solution.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses
Course of the Month19 days, 19 hours left to enroll

873 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