These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Reset Some Fields

koenigma
Registered: Jan 23 2008
Posts: 45
Answered

I have created a form with a heading that contains information I would like to keep rather then re-entering it on a new form, my isea was to place a reset button on the form to clear only those fields which need to have new data entered.
 
The code to the button is(JavaScript):
xfa.host.resetData("Page1.#area[0].#area[1].txtQDnumber.txtQDnumber")
xfa.host.resetData("F.Page1SubformFlowed.CommentsSubform.txtReference")
xfa.host.resetData("F.Page1SubformFlowed.CommentsSubform.CommentsSubform[0].txtDeficiency")
 
But when I click the button all fields are reset, any idea what I am doing wrong
 
Martin

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Accepted Answer
I believe the syntax of the first line might be causing a problem. Trying testing each line individually to see what it does.

Another solution is to export the form data, so you can import it into a new form. That way you don't have to maintain the data in the form.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script