I’m building a LMS for a course and I have Sections that have lessons in them. Sections are a repeating group, lessons are listed within a nested repeating group. Currently when you click on the section it toggles the lessons repeating groups to show or hide for that particular section.
My question is, how can I make the section that has the active lesson in it stay open like in a traditional LMS. I still need the other sections to be able to be toggled so users can jump to different lessons in different sections, but the section with the active lesson must always stay open.
Thought I could use a Custom State but I’m struggling to get it to work right.
Hi Mark, using a custom state is possible. An alternative would be this, check which section or repeating group with the lessons contains the active lesson and do not allow that one to be hidden.
You can do something like this:
add a field lesson_active to the user data type and when he/she selects a lesson, set this new field to the selected lesson:
Add a condition on the repeating group containing the lessons which checks for the active lesson of the current user: