To render my textareafield with a specified number of columns and rows with WTForms, how do I set the number of columns and rows? I followed the instructions from this question but it didn't work:
How to specify rows and columns of a <textarea > tag using wtforms
I tried adding a widget but it didn't work:
class AForm(Form):
name = TextField('Name', [validators.Length(min=4)])
title = TextField('Title', [validators.Length(min=4)])
text = TextAreaField('Text', widget=TextArea(row=70, cols=11))
phonenumber = TextField('Phone number')
phonenumberhide = BooleanField('Display phone number on site')
price = TextField('Price')
password = PasswordField('Password')
email = TextField('Email', [
validators.Length(min=6, message=_('Little short for an email address?')),
validators.Email(message=_('That\'s not a valid email address.'))
])
TypeError: object.new() takes no parameters
{{form.text(cols="35", rows="20")|safe}}
is working – Tyrannous