I'm new to LCD (V 8.2), and need some help setting code to cause one of three user-selected check boxes to make a text field appear. That text field should disappear if that specifc box is deselected.
Thank you in advance,
HDG
Views
Replies
Total Likes
Hi Hugh,
I know how you feel - Livecycle is great, but can be daunting.
There are two main things you need to keep in mind i guess:
(a) text field need to be put into subforms for the show/hide thing to work
(b) rawValue and the click event
I've attached an example of what I think you are trying to do, it should provide some assistance.
I have put three demo text boxes into three subforms and labeled each subform with an easy name - subformA, subformB, subformC
I then set the initilize presence of each subform to "hidden" -- do that by clicking on the subform - not the textbox and going to the script editor - chose javascript and the initalize event from the menu - then enter this.presence = "hidden";
for each checkbox
then select the checkboxes one at a time and set their "click" events in the script editor ( i've used javascript) and set the function using
if (this.rawValue == "1")
subformC.presence = "visible";
else subformC.presence = "hidden";
this code allows show/hide from the checkbox - you can have text shown for each checkbox at the same time with this
if you want only one textbox at all - ie mutually exclusive and tick untick let us know...............
hope thats of some help to you - the demo file should give you a good place to start from
good luck
Views
Replies
Total Likes
Thanks for the response! I'll follow your lead and let you know if I'm successful. BTW- I did not receive the attachment.
Hugh Graham
314-894-6492
Views
Replies
Total Likes
HI Hugh
You will need t download the attachment from the forum directly - it is now
online
I suggest you do, I put it together to demonstrate the behavior your after -
ie it should hopefully help
good luck
Views
Replies
Total Likes
so with the form example given JAVASCRIPT -- SET SCRIPTING LANGUAGE --code
for the droplist would look like
"
switch (this.rawValue)
{
case "1":
subformA.presence = "visible";
subformB.presence = "hidden";
subformC.presence = "hidden";
break;
case "2":
subformA.presence = "hidden";
subformB.presence = "visible";
subformC.presence = "hidden";
break;
case "3":
subformA.presence = "hidden";
subformB.presence = "hidden";
subformC.presence = "visible";
break;
}
"
regards
On Thu, Sep 3, 2009 at 9:50 AM, Legal Logic Limited <
Views
Replies
Total Likes
Oops - sorry that was a code example for another user i was helping got my
mail backwards -- sorry
On Thu, Sep 3, 2009 at 10:38 AM, Legal Logic Limited <
Views
Replies
Total Likes
To Tom,
this sample works with a dropdown list
Views
Replies
Total Likes
Thanks Greg,
I will give it a try. I may be back for some more help if I can't figure it out.
Tom
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies