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 with dropdown selection

Avatar

Level 1

I've been working at this for hours and my pea brain just can't handle it!

My dropdown menu contains two selections, but on form open the selection is <none>

1 - MAINTENANCE DIRECTIVE

2 - TECHNICAL INFORMATION BULLETIN

Dropdown menu is called "TitleType" and is located on the master page.

I have a subform within the main subform called "subformTIB" It contains information that should be hidden when the client selects dropdown option
2 - TECHNICAL INFORMATION BULLETIN

when 1 - MAINTENANCE DIRECTIVE is selected, "subformTIB" should be visible and when <none> is selected, it doesn't make a difference.

Can anyone help with code?

I'd be happy to provide the form if necessary.

1 Reply

Avatar

Level 7

If you only have two options, ensure you have code for both options. I find it works better to have specific code per item rather than an else code.

Example: If the first option hides a field and the second option doesnt. Make sure that is reflected in both item's code.

     In the first option: show required option 1 fields and hide the option 2 fields.

     In the second option: show the option 2 fields and hide the option 1 fields.