Question
1
Replies
33
Views
Posted: June 25, 2020
Last activity: June 25, 2020
Open / Close Accordions using buttons
Hello !
I have this interface with multiple accordions, and I want to be able to close/open them using buttons.
We're using a layout group for the accordions like below.
I also tried to use simple dynamic layouts with headers, but I couldn’t close them using when rules and conditions. ( even with the "SetFlag" activity )
We can achieve this by writing custom JS code. you can see the post on how an accordion works in this thread.
https://collaborate.pega.com/question/how-collapse-acordian-8-version#comment-760601
For your scenario, try below approach.
3. Call this function on the buttons like below.
4. Provide index of the layout in the value param. ("2" opens the second layout of the layout group)
5. Configure Run script event on buttons with the respective index.
I worked for me on Pega 8.4. let us know if it works for you !