Create input fields dynamically | Multiple input fields for single attribute within a same form | create input field on button click
Hey intelligent developers, I am a newbie, kindly bear my lengthy question, i just want to make sure you can get the whole picture :) I have a form admin can create questions and one or more answers for each question. To ensure the better user experience I want this: enters the question statement add an answer for this question add another answer and so on... can be single , can be more (dynamic) Like: if the question is: What is your gender? the answers available will be 1.Male 2. Female And for categories interested in ? 1. fashion 2. stationary 3. accessories 4. electronics 5 . .... I have two tables Questions and Answers, both having 1-* many relation. I used this approach for now: pass answer and question objects with micro-flow made a data view of Answers and get answer attribute vale inside the data view of answers made a data view of questions and get related attributes commit objects Currently I am able to add single answer and single question at a time. So how can I achieve adding multiple answers on the same form dynamically ? What is the work around for this ? Your help will be highly appreciated :)
The questionnaire module has the functionality that you are looking for.