Hi All
I am testing Ionic 5 to use to build a side project.
I have a section where I ask users 7 questions and two of those have input fields while the other 5 require a yes or no answer.
So the questions with toggle must default to false(No) on page load then as user changes the selection then those be sent when user submits the form after answering all 7 questions.
I want to save the first 5 questions as an object and the other two are fine.
So I want to have something like this. screening data will be the combined 5 questions into one object with question id, description and toggle value (yes/no)
{
"user_id":15,
"score":45,
"company_id" : 39,
"additional_info":"visit",
"screening_data": [
{"id": 1 , "description": "description goes here 1", "answer" : "yes"},
{"id": 2 , "description": "description goes here 2", "answer" : "no"},
{"id": 3 , "description": "description goes here 3", "answer" : "yes"},
{"id": 4 , "description": "description goes here 4", "answer" : "no"},
{"id": 5 , "description": "description goes here 5", "answer" : "yes"}
]
}
One Submission I will be sending to backend via api.
I would like your assistance with this.
Thanks