Hi guys.Can anyone please point me in the right direction?I'm trying to create a dynamic form in html with the following structure :
The user is trying to create a survey/quiz.So the form allows them to create all the questions they want for this survey.Next, each question can have as many answers as they wish.So this form needs to be highly dynamic.So the first step is, you type in your first question which will be the first on your survey,then below it appears only one input field for your answer.You can click a button,to add another input field for more answer options.Every question and all its answers are eventually supposed to be stored in a mysql db and will be linked using Primary key foreign key relationships.So far i only have input fields for the question and answer and can add another row of each using javascript.
My challenge is
-i do not know how to link the answers to their parent question
-i do not know to create an edit panel where users can view all the questions and their answers and possibly edit them.
Any pointers,advice,tutorials,sample code that will help me achieve this kind of structure will be highly appreciated.Thank you so much for your time.