from django.forms.forms import BoundField class FieldStack(object): """ EXAMPLE: class MyForm(forms.Form): first_name = forms.CharField() last_name = forms.CharField() website = forms.CharField() twitter = forms.CharField() facebook = forms.CharField() personal_info = FieldStack('first_name', 'last_name') contact_info = FieldStack('website', 'twitter', 'facebook')
{{field.name}} | {{ field }} | {{field.errors}} |