Take a look at this module: https://appstore.home.mendix.com/link/app/234/Mendix/Questionnaire-(module)
You should run this in Mx7 though. It seems this module did not receive an update yet. But it give you a nice idear on how to approach this.
Regards,
Ronald
The module that Ronald mentioned would help you a lot and it is not maintained.
I have used this recently and to avoid any issues, I took this module with in my project and opted to maintain it myself within the project.