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

Populating fields based on selected option button

polster
Registered: Oct 27 2010
Posts: 1

I'm new to using Livecycle. I just imported a PDF document that I originally created in Open Office Writer and now am attempting to make it into an interactive, fillable reservation that populates date fields based on whatever radio button is selected.
 
It looks a little like this:
Let's say button 1, which corresponds to Nov 1 - Nov 12 is selected. Then the ten weekday fields below will each fill with the corresponding dates (Monday, 11/01/2010; Tuesday, 11/02/2010; etc).
 
How do I get this to work using javascript running client side without using a database or table (I can code it all)?

My Product Information:
LiveCycle Designer, Windows
SLDC
Registered: Oct 25 2010
Posts: 70
I'm also fairly new to LiveCycle, but I think this would work:
In the Click event of each radio button, do

TextField1.rawValue = "Monday, 11/01/2010";TextField2.rawValue = "Tuesday, 11/02/2010";
and so forth, with the relevant dates for that particular button.

There's probably a way to do a switch/case statement in the radio button list object, but I haven't been able to make it work by putting the following code either in the Change or the Click events. Perhaps someone else can post a more elegant answer.

switch(this.rawValue) {case 1:TextField1.rawValue = "Monday, 11/01/2010";TextField2.rawValue = "Tuesday, 11/02/2010";TextField3.rawValue = "Wednesday, 11/03/2010";break;case 2:TextField1.rawValue = "Monday, 11/08/2010";TextField2.rawValue = "Tuesday, 11/09/2010";TextField3.rawValue = "Wednesday, 11/10/2010";break;}