Hi Frank,

I'm using the newforms stuff and it lets you do exactly what you
want.  Here is one of my simpler forms:
class AddEditCustomerForm(forms.Form):
    name = forms.CharField(max_length=200)
    customer_type_id = forms.ChoiceField(label="Customer Type")
    notes = forms.CharField(widget=forms.Textarea(attrs={'rows':
'3'}),required=False)
    def __init__(self, data=None):
        super(AddEditCustomerForm,self).__init__(data)
        self.fields['customer_type_id'] =
forms.ChoiceField(label="Customer Type",
            choices=[(c.id,c.description) for c in
CustomerType.objects.all()])

See how I specified the widget for the "notes" CharField?  The attrs
argument to Textarea will let you specify how the HTML for the form is
generated.  In your case you would use something like this:

widget=forms.Textarea(attrs={'rows' : '3', 'cols' : '40'},...)

--gordy


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to