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

Add Instances of Subforms

jwhooper
Registered: May 4 2007
Posts: 2

I am learning to use Designer 7 to build dynamic interactive forms for clients to fill in. Are there ways to Add Instances based on the value of data entered into a particular field. For example if a person enters YES then the instance occurs, but if the person enters NO then it does not.

My Product Information:
Acrobat Pro 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, this kind of interactivity is controled through JavaScript. Look at an of the Dynamic form examples and you'll see code for creating and removing instances of a sub-form. In all of the examples I've seen, the new instance is added when the user pushes a button. What you need to do is work the same code into a different trigger such as the "Validate event of a text field like this

// validate eventif(this.rawValue == "Yes")mySub.instanceManager.addInstance();

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