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.
SOLVED

Hidden fields move visible fields down when hidden fields become visible?

Avatar

Former Community Member

Hello,

I have a form that I have a couple of hidden fields on. If the user choses a specific choice from a dropdown, the field(s) become visible. The question I have is how do I make it so when the fields are invisible the visible fields are close together, and then when a selection is made to make one or more of the invisible fields visible the rest of the fields below it move down to make room?

This is how it is:

field 1

[space for hidden field]

field 2

[space for hidden field]

field 3

This is how I would like it on load:

field 1

field 2

field 3

And if a selection is made from field 1:

field 1

[hidden field visible due to selection in field 1]

field 2 moved down to make room for hidden field visible from field 1 selection

field 3 moved down to make room for hidden field visible from field 1 selection

Thanks in advance for any assistance!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

The second option in the sample in this post: Re: how to overwrite certain drop down menu items show the script to make this work.

Please note that the objects need to be in a FLOWED subform and the form needs to be saved as DYNAMIC.

Good luck,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

The second option in the sample in this post: Re: how to overwrite certain drop down menu items show the script to make this work.

Please note that the objects need to be in a FLOWED subform and the form needs to be saved as DYNAMIC.

Good luck,

Niall