Data lost when Acrobat form is saved

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.
goodmoralsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Karl Heinz KremerCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Karl Heinz KremerCommented:
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.resetForm();
}

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.
0
goodmoralsAuthor Commented:
http://www.experts-exchange.com/Web/Graphics/Adobe_Acrobat/Q_21125614.html
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?
0
Karl Heinz KremerCommented:
You are too quick :-)
0
goodmoralsAuthor Commented:
That works great. We always have Cred.1 filled in, if there is any data in the form.

Thanks again for a great solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.