FAQ Accordions

New Member
1 0 0

Thanks a lot. It worked.

0 Likes
New Member
2 0 1

I have literally created an account to thank you, man. I mean really, this was exactly what I wanted but was too lazy to code myself. You are a true life savior

1 Like
New Member
2 0 0

Any fix for the issue where when one question is open, the others close?

0 Likes
New Member
3 0 0

Hey!

 

This is great, thank you!

0 Likes
New Member
2 0 1

It's not a bug it's a feature. The solution is literally on page 1 of this tread: You control the collapse of the tabs with changing type="checkbox" to type="radio". Checkbox means that a tab opens independently, radio means only one tab can be opened at a time.

 

0 Likes
New Member
2 0 0

I understand its a feature, however I followed this link ( https://www.envision.io/blogs/ecommerce-pulse/28832705-how-to-add-an-faq-accordion-to-your-shopify-s...) and there is no radio/checkbox option. I guess the radio/checkbox would work if you follow Sean's link.

 

0 Likes
Shopify Partner
28 0 2

@sean_orfila 

First of all thanks for your code!

 

If I set the type to radio when I open an application, the previously opened one closes.

 

However I can no more open close the same question (I mean without opening another one), right?

Is there a solution to have both behaviors?

0 Likes
Shopify Partner
139 3 13

@quadri changing the input from a radio to a checkbox should work in your case.

0 Likes
Shopify Partner
28 0 2

@sean_orfila 
I think I didn't explain myself well:

 

  • checkbox - You can close an opened question by clicking the symbol on the right BUT opening one question does not automatically close any other opened questions
  • radio - Opening one question automatically close any other opened question BUT the symbol on the right of the question doesn't work properly (you can open but you can't close a question)

What I'm asking is, is it possible to have the following behaviour

  • You can close an opened question by clicking the symbol on the right AND opening one question automatically close any other opened question?

I guess it would take a checkboxes (so it can be selected and unselected, for opening/closing the question) but that like radios only one can be selected (when you open one question the other closes)

0 Likes
Highlighted
New Member
1 0 0

First of all thanks for posting this code!
Unfortunately after following all of the steps, including the snippet of code you provided, I cant seem to get the page.template to show up in the dropdown.
Any ideas on how to troubleshoot this?

0 Likes