Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Form prototype - rendered form
The loop renders:
<div id="participants">
<div id="manifest_participants_0">...</div>
<div id="manifest_participants_1">...</div>
</div>
(without prototype)
`form_widget(form.participants)` renders to:
<div id="participants">
<div id="manifest_participants">
<div> ... participant1 ... </div>
<div> ... participant2 ... </div>
</div>
<script> ... prototype ... </script>
</div>
For the empty collection the loop renders:
<div>
<label>Participants</label>
<div id="manifest_participants"></div>
<script> .. prototype .. </script>
</div>
`form_widget(form.participants)` renders to:
<div id="participants">
<div id="manifest_participants"></div>
<script> ... prototype ... </script>
</div>
Hope that helps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment