How to create the microflow for the next and previous buttons for the quiz module

0
  what logic can be written for next and previous buttons ?
asked
1 answers
0

Hi Purva 

You have a set of questions and their respective options ready in their entities.

On this page, you can have a data view that returns a non-persistable object with an integer attribute. This attribute holds the current displayed question number. Inside this data view, you can place a widget that returns the respective question and its options based on the question number present in that attribute.

In your "Next" button microflow, you need to increase this attribute by 1 and then refresh this non-persistable object to reload the data view with the latest question number. Based on the latest question number, a new question will be loaded each time you click the "Next" button. Similarly, for the "Previous" button, instead of incrementing by 1, you need to decrement by 1

answered