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

Conditional form fields

jadinfrost
Registered: Jun 4 2009
Posts: 3

What I am attempting to do is create a form used to order food items for events. There are various fields that are to be used for this. What I want to do have the contents of one form field be dependent on the selection made in a previous form field. Lets say my fields follow as such.

Quantity - Category - Options - Unit Price - Total Price

What I want to do is have the user enter the quantity they would like. In the category they can choose from some general options, lets say they had breakfast, lunch, or dinner items. When they make the selection the Options category would only list the items that were appropriate to the selection made in the Category field. Once they chose the exact item they wanted in the Options field the unit price would be listed thus calculating the Total Price based on the quantity.

I think I can work through this but my java is quite weak and I am learning as I go. Any feedback on how to make something like this work? Is this possible through PDF?

Thank you!

My Product Information:
Acrobat Pro 9.1.1, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi jadinfrost,

Yes, this is all doable and yes it will require quite a bit of scripting on your part. There are several on demand e-seminars here at acrobatusers.com on creating PDF forms in both Acrobat and LiveCycle Designer, and a couple on scripting in both those programs as well. You'll find them in the Learning Center. That should probably be your first stop.

Then in the Learning Center and Forms Galleries you will find example PDFs and tutorials including order forms, etc that you can download to examine the code used to make them work. There are also many tutorials on JavaScript there ( use the filter to search for "JavaScript") on a wide variety of scripting topics. As you find the need for different kinds of scripting tasks in your form look for articles on those topics there.

For a beginning course in scripting for Acrobat and PDF, take a look at www.pdfscripting.com. There's a full course of on-line videos in Acrobat and PDF scripting as well as more sample files and copy-n-paste scripts.

Once you get going with your form and have trouble with particular parts, this forum is a good place to come back and ask pin-point, detailed questions. Try to keep them focused and detailed because if they take a lot of time to answer or if you are asking for complex code to be written for you, you may not get a timely answer, or any at all- depends on how much volunteer time people have the day you ask.

Hope this helps,

Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com