I have to create a questionnaire with 58 questions divided in 5 sections. Not all sections are the same length one has 22 questions, other has 5.
I have created a layout where each section is in a Card from dash-boostrap-components and at the end of each section there is a Graph that will collect the values of the radio items used for answers. Like this:
However, I have two questions:
The first one is, if there is a better way to do this than writing the same code 5 times for the sections an 58 times for the questions. Iām going to store the results to a database, so I can create a table with the sections and another with the questions but Iām not sure if I can create the code dynamically and then add the results to the layout? Could someone point out if thatās possible and direct me to an example?
The second one is about collecting the values of the radio items, the form has to have a āSendā button and after is āpressedā collect the values of all the answers to finish the Graphs adding a second column āResultadoā, I can declare all the radio items values as Inputs in the Callback for the button but Iām wondering if thereās another way to that.
Thank you for your help!