Creating a popup displaying a content, with "Next" and "Back" buttons navigating through its ordered chapters

Hello everyone,

Here is my question: In my database, I have a “lessons” type and a “chapters” type. Each lesson contains a list of chapters, each with an order number. I want to click on a lesson’s image in a repeating group on my page and have a popup open with the lesson’s content. So far, so good. However, I’d like a “Next” button in the same popup to hide the lesson’s content and display the first chapter’s content. Then, each time the user clicks the “Next” button, the next chapter appears, and when they click “Back,” it navigates to the previous chapter.

Does anyone have an idea of how to do this? (I’m a beginner ;-))

couple of ways you could achieve this

  1. put a repeating group in the popup and set it to 1 row x 1 column and then page through the chapters
  2. set the pop data type as chapter but also send the lesson as a parameter to the pop (or store it on the chapter). then do filtered lookup something like - this chapters lessons chapters filtered to order = current chapters order +/-
  3. store the chapters list in a param or state on the popup and then do lookup - list of chapters filtered to current chapter order +/-
2 Likes

Thank you for taking the time, I’ll check. :slight_smile: