I hope this makes sense!
I have repeat within a repeat to create a poll question and answer text fields in a form.
At the top level the repeat is to create a question to create the questions.
There is an answer repeat within this question repeat used to create an answer text field to create the answer options.
Like this
[Add question Button]
1. Question (repeat1)
[Add answer Button]
- Answer (repeat2)
- Answer (repeat2)
- Answer (repeat2)
At the moment I am using a variable “Question” and “Answer” to progress the value of the variables +1 to add the repeat rows.
This is all fine at the question level, so every-time the “Question” variable + 1 it creates a new question text field row. Within this row is another repeat which allows you add Answer options.
However, when you add second question “question” variable progresses = “2” it works but the problem is that it pre-populates the “Answers” because of course it is using the same “Answers” variable so it will just add the number of Answer rows based on what that variable was set in question 1.
My question.
Other than adding additional variables for each answer set for each question, is there a way to create a a variable or similar option on the go so I can create independent answer sets without having to hard code a variable for ever answer set??
I think what I am asking is can I set a dynamic variable at each “Question” repeat level based on the row index as the assigned name?
Thanks!
Last updated: