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

Scripting Logic

winnthsawn
Registered: Aug 16 2007
Posts: 2

Hi there,
 
I'm new to using Acrobat, and I'm getting confused about something I thought was simple.
 
I am using LiveCycle Designer 8.0 to build a form. basically, what I want to do is change the presence of an object on the form based on user input. For example, I have two objects on my form: a dropdown list (DDList1) and a text field (Txt1). Initially, Txt1 is invisible. What I'd like is when a user selects a particular value from DDList1, then Txt1 becomes visible for them to input text.
 
I'm having trouble figuring out the proper syntax. The scripting language doesn't matter (FormCalc or JavaScript) - whichever one is better works for me.
 
Thanks in advance!
 
Cheers,
Shawn

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Stick with javaScript for this one. The exact syntax depends your form's hierarchy, but here's the basic code you should have in the "Change" event for the dropdown list.

if(xfa.event.change == "MyValue")Txt1.presense = "visible";elseTxt1.presense = "invisible";

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