Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Automatically Clearing a Form When Document Closes

Avatar

Former Community Member
I'm trying to find a way to automatically clear the information in a form without using a reset button. Our forms are used by many individuals, and this way the form will be cleared of data when the next person goes to use it. These forms will be uploaded to the internet on our website. I am sure there is a way to script it, but since I am a new designer user, I haven't been able to figure it out. Thank you!
6 Replies

Avatar

Former Community Member
I'm not sure I understand your question - why would you expect the data that the last person entered appear in the form when another person opens it if it is just a form template that is accessed from a server? Unless you specifically script the form to load with data that was previously saved (to a database, XML file, etc.), it won't open with data.

Avatar

Former Community Member
When we upload the form to our website, it is a static or dynamic pdf. When you click on the form, it will open in reader, or the full version of acrobat (whatever the user is using). Unless you remember to click on the reset button to clear the form, the form retains the data you have entered when you close the file. Next time you go the website, and again click to open the form, the data will still be there. There is no back end to this form - we do not want the data to be saved, just printed or submitted by email. I have tried this from workstations with just reader, and I still get the same results. Thanks for your input.

Avatar

Former Community Member
Why not reset the form when the user "opens" the PDF document. You can do this by putting the following JavaScript code in the docReady event in Designer.



xfa.host.resetData();



Hope this helps.



- Chris.

___________________________________



Chris Dahl - Chief Technology Officer

ARTS PDF Global Services

chris.dahl@artspdf.com

http://www.artspdf.com/globalservices

Official PDFlib Global Integrators

Avatar

Former Community Member
Thank you Chris! I believe this is exactly what I am looking for. I'll give it a try!

Avatar

Former Community Member
That is what I want to do also but I am using 5.05. How do I set a web form to clear on open?