How to save state information using Javascript

I have a dynamic form. Currently, it opens in a condensed state. Based on a user's input, the state may expand considerably. After the user sends it via an email submit button, I would like the form to open and display all the filled out fields. I believe I need to set a state variable when the form is filled out, so I can examine its value when the form is reopened. How can I do this? It seems that if I use a global variable, its value is reset to the default value when the form is closed and reopened. I am using Javascript and LiveCycle Designer ES2. My target is Reader, and I save the form with the Reader Extended PDF (save)option.

John Tough

1 Answer

You're explaination is not clear. Does the state exist on your system or the form? You mentioned the global variable, this is on your system. And it can be made persistent, look it up. But if the state lives on the from then why not save it in a hidden field?

Thom Parker
The source for PDF Scripting Info

The Acrobat JavaScript Reference, Use it Early and Often

The most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Having trouble, Why Doesn't my Script Work

Thom Parker   

Please specify a reason: