1 2 3 4 5 6 7 8 9 | from django import newforms as forms
class myForm ( forms.Form ):
foo = forms.CharField ( maxlength=20 )
bar = forms.CharField ( maxlength-20 )
# Now here's the Textarea
baz = forms.CharField ( widget=forms.widgets.Textarea() )
|
More like this
- Multiple-Submit-Button Widget for Choice Field by Archatas 4 years, 10 months ago
- use oldforms validators in newforms forms by garywilson 6 years, 2 months ago
- FCKWidget for NewForms by Digitalxero 5 years, 4 months ago
- TinyMCE Widget by semente 3 years, 9 months ago
- "Dynamic" form with a hidden field by flaxter 4 years, 2 months ago
Comments
It's probably also worth mentioning that you may assign the rows and columns attributes in the widget:
widget=forms.widgets.Textarea(attrs={'rows':4, 'cols':60})
#
Thanks, I was rather confused that the naive
failed silently.
#