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

No vs Yes that triggers choices

djaar
Registered: Oct 21 2007
Posts: 4

In Livecycle Designer, how can I create a question that is answered by No and Yes, and that, when answered by Yes, adds a sentence and a dropdown menu?
For Example:
"Do you save files to mobile media" No Yes, I save files on (dropdown menu) 1) USB Key, 2)DVD, 3) iPod, 4) Other.

My Product Information:
LiveCycle Designer, Windows
pddesigner
Registered: Jul 9 2006
Posts: 858
You'll need to add a couple of hidden sub forms that are linked to the Yes No radio buttons.

Acrobat expert - J.P. Terry has written a new book "Creating Dynamic Forms with Adobe LiveCycle Designer" which will provide detailed instruction on implementing this function.

Go to [url=http://www.smartdoctech.com/books.aspx]www.smartdoctech.com/books.aspx[/url] and review the book description and sample files.

My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.

sconforms
Expert
Registered: Jul 10 2007
Posts: 92
To elaborate a little further, I would create a radio button list using two radio buttons from the Library palette and I would put a single drop down list object with items like "USB Key", "DVD", "iPod", "Other" and a caption that reads, "I save files on". I would also make the drop down list initially invisible by setting its presence property to "invisible" via the Object palette's Field tab.

Now that you've got the form objects created, you'll need to tie them together with some script that shows the drop down list only when the "yes" radio button is picked. That's done fairly easily by using the Script Editor palette. You'll need to add a script that checks the value of the selected radio button and shows/hides the drop down list accordingly.

Select the radio button list object (not an individual radio button -- use the Hierarchy palette if you need to) and select the "Click" event in the Script Editor. The following JavaScript should do the trick:

if (this.rawValue == "Yes")DropDownList1.presence = "visible";elseDropDownList1.presence = "invisible";
Last but not least, I notice you have an "other" item in your drop down list. I'm assuming you want a text field to appear, when that item is chosen, so that the user can enter the alternate device they're using. For that, simply [url=http://forms.stefcameron.com/2007/08/07/what-about-the-other-field/]check-out this tutorial[/url] on my blog.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.

djaar
Registered: Oct 21 2007
Posts: 4
Thanks Stefan! We are almost there but the invisible Droptdownlist remains invisible when we click Yes...