Skip to content

Instantly share code, notes, and snippets.

@webmozart
Created February 24, 2011 23:23
Show Gist options
  • Save webmozart/843115 to your computer and use it in GitHub Desktop.
Save webmozart/843115 to your computer and use it in GitHub Desktop.
<form method="post" action="..." {{ form.enctype }}>
{{ form.errors }}
{% for field in form.visible_fields %}
{{ field.label('My label') }}
{{ field.errors }}
{{ field.widget }}
The ID of this field is: {{ field.id }}
And the value: {{ field.value }}
{% endfor %}
Manually rendering fields:
{{ form.fields.name.row }}
{{ form.fields.email.row }}
{{ form.rest }}
<input type="submit" />
</form>
@beberlei
Copy link

Just do:

{{ form.myfield.widget }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment