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

multiple show/hide fields

Ray
Registered: Mar 6 2007
Posts: 48

LiveCycle Designer 8:
 
I need a script that when the end user selects a checkmark (Checkbox3), two other objects become visible. The two fields are Date (a date picker), and the second field is for time, entered manually. I used a script for a single field but did not work for either of these two fields. The goal is when a future appointment checkbox is clicked, the date and time fields to appear, otherwise remain invisible. Again, the Date field is a date picker, and the second is a simple textfield with the "Time" as its caption. Thank you

My Product Information:
LiveCycle Designer, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
First off, be sure to use hierarchical names and it will make your JavaScript writing much easier.

Open the Actions tab on the Check Box properties and add a Run a JavaScript action. In the JavaScript Editor, add the following code:

var f = this.getField("fldName");
f.hidden = true;

fldName in the above code would be the parent name of your other fields —something like fldName.1, fldName.2, etc.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.

Ray
Registered: Mar 6 2007
Posts: 48
Thank you Ted.

Your script did not work. Maybe I am doing something different.

There is no Actions tab for the Check Box properties. I used the script editor and entered your script with proper filed names. But it did not work.
cfinley
Registered: Jan 9 2008
Posts: 70
i have the same problem (want to show/hide fields cased on a check box on/off action)
and I also found no action tab

is this possibly something in acrobat or Livecycle ES? and we are both wrong, could you please take a screen shot of said action tab?
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
Hmmmm. sorry. The above script is used in Acrobat. Not sure what script would be used in LCD. You might want to post the question in the Forums. I'm sure someone knows how to script it in LCD.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.

AlScott
Registered: Nov 2 2007
Posts: 123
Ted,
I think my question is related to the above (hope it's in your book - just ordered it - what a creep eh?)
Anyway -
Actually - I've a question that's related to that in a way. I'm torn between LiveCycle and 'Pro. Prefer the former though if poss.
Here's what I want to try to do:
I've several forms that are basically the same - and would like to create one pro-active form. For example. Imaging we're creating a User Form.
You have the common section - name etc etc.
Then a drop down menu saying: Finance, Inventory, HR
When you select, say Finance a separate section appears asking you a set of questions...it adds this to the form as a new section.....

Now you could have several buttons on this page each adding a separate 'section'.
Thanks
Al