How to store data of a nested repeater field with relationships?

Hi there,

I'm building an exam management module and I'm trying to figure out how to store data for a nested repeater field. The repeater field is called "Questions", and it allows the user to create multiple questions for an exam test. Each question has a text field and a nested repeater field called "Options", which allows the user to create multiple options for that particular question.

Here's my question: how can I store the data for the nested repeater field with relationships? Specifically, I want to store the exam test data in the exam test table, the questions in the questions table, and the options in the options table. In the questions table, I have an 'exam_test_id' column which references the id of the test, and in the options table, I have a 'question_id' column that references the id of the question.

Do I need to apply a relationship to the respective repeaters in my Exam Test form? And how would I go about storing the data for each nested repeater with the appropriate relationships?

Any help would be greatly appreciated. Thank you in advance!
Screenshot_2023-03-14_085339.jpg
Was this page helpful?