Skip to content

Instantly share code, notes, and snippets.

@chmielot
Created June 14, 2011 15:12
Show Gist options
  • Save chmielot/1025102 to your computer and use it in GitHub Desktop.
Save chmielot/1025102 to your computer and use it in GitHub Desktop.
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