Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Show/Hide Subform Based on Drop Down

Avatar

Level 3

Hello,

I have a form that will have about 150 different alarm panel zone lists (specific alarm points: doors, panic buttons, etc) and I would like to have it be where I choose the store, for example 3351 and have the zone list populate in a table below.  I was using the switch(this.rawValue) function, which works for a small amount, no more than two, but when I start adding more stores, it stops working.  I am wondering if any one has any idea on how to do this.  I am a novice, but have played around with javascript, but now I am at a loss.

Thanks,


Justin

2 Replies

Avatar

Level 3

Update,

I found a script that works for the first 10 stores:

if (xfa.event.newText == "store number")

{

     storenumber.presence = "visible"; //if I want the subform to be visible

     storenumber.presence = "hidden"; //if I want the subform to be hidden

...

}

The idea would be to have all 150 stores in there and select them through the drop down, but I can only get the first 10 to work.  Is there a limit on how many Adobe will read that I am missing?

Thoughts on any of this?  Any help would be appreciated.

Justin