Top "Wtforms" questions

WTForms is a flexible forms validation and rendering library for Python.

Working with WTForms FieldList

I use WTForms with Flask via the Flask.WTF extension. This question isn't Flask-specific, though. WTForms includes a FieldList field …

python ajax forms flask wtforms
Flask-WTF: CSRF token missing

What seemed like a simple bug - a form submission that won't go through due to a "CSRF token missing" …

python session flask wtforms flask-wtforms
Custom attributes for Flask WTForms

I develop website on Flask and AngularJS. I need to send a form whith AJAX using AngularJS but it requires …

javascript python angularjs flask wtforms
wtforms Form class subclassing and field ordering

I have a UserForm class: class UserForm(Form): first_name = TextField(u'First name', [validators.Required()]) last_name = TextField(u'Last name', […

python subclassing wtforms
Flask-WTFform: Flash does not display errors

I'm trying to flash WTForm validation errors. I found this snippet and slightly modified it: def flash_errors(form): """Flashes …

python flask wtforms
WTForms validators.optional: continue validation of empty fields?

I have a problem with WTForms validators.optional() because it stops the validation chain if the field is empty (WTForms …

python validation wtforms
Flask WTF-forms adding select and textarea

I am trying to make a flask form which produces the following HTML: <input type="text" name="title" class="…

python forms flask wtforms flask-wtforms
How to use WTForms in Ajax validation?

I accustomed of using WTForms by means of Flask-WTF in my flask application. Doing server side validation is trivial. But …

python flask wtforms flask-wtforms
Is there a way to control the width of wtf.form_field input fields without affecting the label width?

I am currently rendering several Flask fields (SelectFields, InputFields) using the following jinja2 template: <div>{{ wtf.form_field(…

flask jinja2 wtforms flask-wtforms
Unique validator in WTForms with SQLAlchemy models

I defined some WTForms forms in an application that uses SQLALchemy to manage database operations. For example, a form for …

sqlalchemy unique validation wtforms