Malcolm Tredinnick wrote:
>> Is there any way to explicitly order fields?
>
> This is one of those cases where reading the newforms source is going to
> be the best way to work out the answers. It shouldn't be too hard for
> anybody who wants this kind of depth to trace through what is going on.
On Tue, 2007-05-15 at 13:18 +0200, Bram - Smartelectronix wrote:
> Hey everyone,
>
>
> How do I change the order of the fields in a newform:
>
> class ContactForm(forms.Form):
>to = forms.ModelChoiceField(ContactEmail.objects.all())
>message = forms.CharField(widget=forms.Textarea())
>
Hey everyone,
How do I change the order of the fields in a newform:
class ContactForm(forms.Form):
to = forms.ModelChoiceField(ContactEmail.objects.all())
message = forms.CharField(widget=forms.Textarea())
def __init__(self, user, *args, **kwargs):
super(ContactForm, self).__init
3 matches
Mail list logo