System Design for dynamic questions answer form

0
Which is the best way to design system for dynamic form my  Eg. Question answer form      Admin design question form and add answer type dynamic 1. Admin can add dynamic textbox box 2. Admin can add dynamic check box 3. Admin can add dynamic radio box 4. Admin can add dynamic dropdown After create question form User use this form but user chuse only  those types where as admins declared answer type  Which is the best design my module (entity)
asked
2 answers
0

I made this quite some time ago.

 

I had a module where I would create the survey and could configurate (TemplateConfig) this would look like this:

Then a module called survey where I would publish my surveys to the people, this would look like this:

So I would create a survey in my TemplateConfig, there I would add questions and the people that should enter the survey. Then when I was done with creating and configuring the survey I would publish it. I must say I created this survey app quick and dirty in a day or so to showcase Mendix and some modules like the email, deeplink etc. So I wouldn't advice to copy this 1-1 but I think it offers a good start for you.

 

The questions can be created with the start question what kind of question do you want to add (make this an enum). From there on you can show the required fields when adding a question for example:

 

[edit] QuestionnaireHeader entity can be considered as a category. For example you can have a header called Personal where you add questions about age and so on. Then you can create another Header where you can add additional questions such as type of work, skills, years of work experience etc. By adding a sequence at the header and  questions (see the entities) you can add sorting. 

 

- Survey name

-- Header

--- Question

--- Question

--- Question

-- Header

--- Question

--- Question

--- Question

answered
0

Use JSON Schema to JSON Form widget https://marketplace.mendix.com/link/component/207872 

answered