Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Repeating fields Setup
<div class="container">
<div class="collection">
<div class="template" style="display:none;">
<input type="text" name="questions[%][question]" value="qq"/>
<input type="text" name="questions[%][type]" value="qt"/>
<div class="container">
<div class="collection">
<div class="template" style="display:none;">
<input type="text" name="questions[%][options][@]" value="o"/>
</div>
<!-- some sort of loop to create existing items -->
<div class="item"></div>
</div>
<div><a href="#" class="oadd">Add Option</a></div>
</div>
</div>
<!-- some sort of loop to create existing items -->
<div class="item"></div>
</div>
<div><a href="#" class="qadd">Add Question</a></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment