Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How can I make a subform conditional upon results of dropdown box?

Avatar

Level 1

I have a dropdown box. I also have a subform. If you select "A," I want the subform to appear.  If you select "B", I don't want the subform to appear.  I am using Adobe Livecycle Designer 8.0.  Am I in the right forum?

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi,

I have cahnged youre code a little. You were using wrong variable in the if condition, i changed it to correct.

Now it works.

See attach.

BR

View solution in original post

5 Replies

Avatar

Level 6

Hi,

Example script is:

On cange event of drop down

var newtext = xfa.event.newText;

var

value = this.boundItem(newtext);

if (value == "A") {

     subform.presence = "visible";

}

else if (value == "B"){

     subform.presence = "hidden";

}

BR,

Paul Butenko

Avatar

Level 1

Thank you very much for your kind reply, Paul.  I tried it, but the subform is still displaying every time - no matter what is chosen.

The dropdown box is called CarrierType.

The subform called ForHireSubform should only be displayed if "For-Hire" is chosen from the dropdown box called CarrierType.

Would you mind having a look at the attached form to tell me where I'm going wrong?  I'm an experienced programmer, but don't have Livecycle or Javascript experience.  Thank you very much.

Avatar

Level 6

Form is queued, i can't check it. Send it to bytia@ukr.net

Avatar

Correct answer by
Level 6

Hi,

I have cahnged youre code a little. You were using wrong variable in the if condition, i changed it to correct.

Now it works.

See attach.

BR

Avatar

Level 1

Thank you so much for your help.  This is wonderful. It works now.  I will be able to use this code for dozens of forms at my agency.  Thanks again.