Show/hide a textfield based on dropdown selection | Community
Skip to main content
June 25, 2024
Solved

Show/hide a textfield based on dropdown selection

  • June 25, 2024
  • 4 replies
  • 999 views

I have a dialog with 3 dropdowns A,B&C. Either of these will be displayed based on another dropdown using wrapperClass. Each dropdowns has 3 options X,Y,Z. When Z is selected, a text field must be shown, otherwise it must be remained hidden. Any inputs?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by h_kataria

If you are using acs commons in your project then use this https://adobe-consulting-services.github.io/acs-aem-commons/features/ui-widgets/show-hide-widgets/index.html and live happily ever after. Although I am curious why would you have 3 different dropdowns in your dialog with the same values.

4 replies

MukeshYadav_
Community Advisor
Community Advisor
June 25, 2024
h_kataria
Community Advisor
h_katariaCommunity AdvisorAccepted solution
Community Advisor
June 25, 2024

If you are using acs commons in your project then use this https://adobe-consulting-services.github.io/acs-aem-commons/features/ui-widgets/show-hide-widgets/index.html and live happily ever after. Although I am curious why would you have 3 different dropdowns in your dialog with the same values.

Anudeep_Garnepudi
Community Advisor
Community Advisor
June 26, 2024