Change Widget depending on aswer

Hello everyone,   I am working on a questionnaire, and I want to use several widgets. Depending on the question type, I need to put a specific input element, is there a way to do it? I'm sorry if I was clear, I can clarify your doubts.
1 answers

Hi Ivan


Of course this is possible! First and foremost, you need an entity (for the sake of this example, let's call it 'Answer'). This entity has some attributes of different data types: I'll give you some examples: 


  • If you want a free text answer: you would choose a string data type
  • If you want a number: you would use an integer, long or decimal based on your need
  • If you want a selection of options: you would use an enumeration
  • If you want a true/false statement: you would use a boolean
  • If you want to insert a data: you would use a datetime 

Each of these data types have widgets which you can use to correspond to the data type. I will add a picture here of the possibilities:



If you want additional information on these options, you can find it here.

Good luck! :)