Hi everyone, I'm creating a FAQ to my applications and I'm using a 2 Columns division where on the left side I have the Section Index (Question of the Application) and on my right side the Answers with Section Expandables in every answers so when the user, clicks on the link of the questions, it expands only that question. My problem is that, I'm not aware if there is a way to expand or collapse in a dynamic way, where by default all answers are collapse and it expands only the one where the user clicked.


Thanks for your support and attention :)

Hi Miguel,

There's no way to do what you want using Section Index. Section Index is nothing than a list of <a hrefs>, with a link to the section.

If you want to dynamically expand/collapse the sections, you'll need to create a Section Index-like widget yourself. I assume the q&a-s you have are in the database, and you have a List Records widget that displays them using the Section Expandable? You can then construct a table of contents yourself, with links that trigger a Screen Action (Ajax Submit) that collapse/expand the right ones, Ajax Refresh, and then jump to the right section (you may need to Widget_Click on a hidden button with the right link to get it to work).

Kilian Hekhuis wrote:

Hi Miguel,

There's no way to do what you want using Section Index. Section Index is nothing than a list of <a hrefs>, with a link to the section.

If you want to dynamically expand/collapse the sections, you'll need to create a Section Index-like widget yourself. I assume the q&a-s you have are in the database, and you have a List Records widget that displays them using the Section Expandable? You can then construct a table of contents yourself, with links that trigger a Screen Action (Ajax Submit) that collapse/expand the right ones, Ajax Refresh, and then jump to the right section (you may need to Widget_Click on a hidden button with the right link to get it to work).


Hi Kilian, thank you so much for your fast response, I already tried that myself but me and the company that I'm working with saw that it wasn't the best way to do it, just because there will be one time where we'll be filled with lots of questions and answers, but much grateful for your explanation. Have a nice day! :)

HI Miguel,

If they're not in the database, then you can still use this approach, but you'll need to hardcode some stuff. Still doable though. Happy coding!