79. Show/hide dialog fields with a Checkbox in AEM.

Опубликовано: 28 Декабрь 2018
на канале: AEM and Devops Tutorial
23,418
128

Show/Hide(toggle) dialog fields with a Checkbox in AEM: There may be a requirement when you want to change the dialog fields based on the selection of the Checkbox like I shown in this video clip.

Out of the box AEM doesn't provide this functionality using checkbox. I have the Javascript js that we can use to achieve this.

Use the link https://github.com/pankajchhatri/AEM to copy the JS file.

To use this custom js, create the client library with category cq.authoring.dialog.

There are 3 steps to use checkbox show/hide.
1. Add cq-dialog-dropdown-showhide class to checkbox field.
2. Add cq-dialog-dropdown-showhide-target data attribute to the dropdown and value will be jquery selector I have used .togglefields.
3. Add the selector class to each field that you want to show/hide.

Once it is done, use your component and open the dialog box. You will find the checkbox which upon checking shows the fields an on uncheck it hides the field.


share, support, like and subscribe
Subscribe : https://www.youtube.com/channel/UC5Lc...
LinkedIn :   / pankaj-ch.  .
Facebook :   / pankajchhatri  
Twitter :   / pankajchhatri  
Google plus : https://plus.google.com/u/0/+pankajch...

About : AEM/CQ5 tutorial is a youtube channel which helps you to learn AEM concepts theoretically as well as practically.


Смотрите видео 79. Show/hide dialog fields with a Checkbox in AEM. онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь AEM and Devops Tutorial 28 Декабрь 2018, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 23,418 раз и оно понравилось 128 людям.