Hi developerName,
Can you share your domain model.
You can create Answer entity with one answer attribute string type. Whenever question is being answered convert value into the string format for display purpose.
Thanks,
Mobin
.Hi,
Could you not create a Question entity with a String attribute that stores the question you want to ask, e.g. "How would you rate this question on a scale of 1 to 10?"
Give it a QuestionType enumeration as well which has the different types of questions you want to capture, for example 'DropDown', 'Numeric', 'Open'.
Based on the selected type, apply conditional visibility to fields used for capturing the answer?
By default, show no answer fields, but if I select 'DropDown' show the dropdown widget with my options, or if I select 'Open' show an AnswerTextField?
A numeric scale would just be an enum with the values you want and then use a radio button to capture the answer.
If you wanted to capture a number, then just use a text field with some validation to only allow values between say 1-10 and nothing els
Would probably want it to more customisable by having yet another entity associated to it so that you can dynamically add items to a drop down instead of using runtime values.
Take a look at https://marketplace.mendix.com/link/component/234
or any other similar marketplace components