Created
July 13, 2011 21:34
-
-
Save j/1081388 to your computer and use it in GitHub Desktop.
Collection Prototypes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="{{ path('form_submit') }}" method="post"> | |
{{ form_errors(form) }} | |
{{ form_rest(form) }} | |
<input type="submit" value="Save" /> | |
</form> | |
{{ form_protypes(form) }} | |
would render something like: | |
<form action="/form-submit" method="post"> | |
<div> | |
<label for="form_name">Name</label> | |
<input type="text" value="" maxlength="255" required="required" name="form[name]" id="form_name"> | |
</div> | |
<div id="form_collection"> | |
<label for="form_collection">Collection</label> | |
</div> | |
<input type="submit" value="Save" /> | |
</form> | |
<div style="display: none;"> | |
<div id="form_collection_prototype"> | |
<div> | |
<label for="form_collection_title">Title</label> | |
<input type="text" value="" maxlength="255" required="required" name="form[collection][title]" id="form_collection_title"> | |
<a class="remove" href="#">Remove</a> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment