Accordions - Open all

Hi all, Just wanted to check if there was a solution or custom code that allows a user to press a button which would allow all the accordions on that page to open?

Feedback from a user has asked if such feature is doeable on fliplet. A nice to have but not essential.

Thanks

Hi Jonathan,

You can use query parameters to open accordions, does this help?

Thanks Mel for pointing me in this direction. I have not explored this before. I will take a look and post back how I get on. I did search for accordions in the self help but did not across this article. Thanks again :slight_smile:

No problem!

The support for this one is in our developer documentation. Sometimes for more advanced features, you’ll find support there.

You can have a look at, and search our developer documentation here: https://developers.fliplet.com/

Hi Fliplet Team, Thank you for sharing the useful tips regarding opening all the accordions on a page.

The steps I took are:

  1. Added a blank button and set the click parameters to no action.
  2. Using the Query Parameters, using the 3rd example ie( under Open All Accordions with title" " and scroll to the first match) , I added the HTML code below to open accordions with the word LPP.

fl-button cid=“16175383” action=“openAccordion&title=LPP&scroll=true”></fl-button

  • I had to remove < and > from the beginning and end as it wasn’t showing the code in this message.

Maybe I’m missing something obvious.

Hey, Jonathan!
Query parameters are used to perform some action when moving from one screen to another.
Let’s imagine that you have 2 screens: screen 1 and screen 2
On screen 1 you have a button. On screen 2 you have an accordion. Clicking the button on the first screen should redirect you to the second screen and open the accordion section with the heading “LPP”.
To make it work, you should select in the button’s settings:

  • Link action: Display another screen
  • Select a screen: specify the screen name with accordion (screen 2)
  • Add query parameters: action=openAccordion&title=LPP&scroll=true

Once the button is pressed, you will be redirected to screen 2 with the first open accordion named “LPP”.