wtforms Questions
2
Solved
I want to use a phone number field in my form. What I need is when this field is tapped on Android phone, not general keyboard, but digital only appears.
I learned that this can be achieved by usi...
Epoxy asked 26/3, 2016 at 21:6
1
Imagine I need to build a travel planning form like this:
Going from [_Picadily_Circus____]
Going to [_Marylebone_____]
(Starting by) (Arriving by) [5]:[30][pm]
Both (Starting by) (Arrivin...
Moorehead asked 18/3, 2016 at 17:27
1
Solved
I have a page with multiple links to redirect the user to different pages. I thought using a form would be nicer, so I defined a WTForms Form with multiple SubmitFields. How do I determine which bu...
Bode asked 3/3, 2016 at 13:51
1
Solved
for some reason I need to declare a field inside the __init__() so I can make arbitrary type of FormField.
Take for example in form.py:
class PurchaseForm(Form):
item_class = ItemForm
transacti...
Knead asked 14/2, 2016 at 3:28
6
I have a UserForm class:
class UserForm(Form):
first_name = TextField(u'First name', [validators.Required()])
last_name = TextField(u'Last name', [validators.Required()])
middle_name = TextFiel...
Jovial asked 1/5, 2011 at 12:11
1
I have a form that contains a price decimal field, like so:
from flask.ext.wtf import Form
import wtforms
from wtforms.validators import DataRequired
from decimal import ROUND_HALF_UP
class AddLi...
Jannery asked 5/1, 2015 at 14:48
1
Solved
What I'm trying to do is get user input on 5 different fields, then have what the user entered available to use in the rest of my program in python. The code I have so far, looks like this:
class ...
1
Solved
I'm trying to display radio buttons horizontally using Bootstrap-CSS and Flask-WTForms. As far as I understand, I need to use the Bootstrap class class_="radio-inline" to accomplish that. I've trie...
Complain asked 2/2, 2016 at 18:56
2
I am using the latest version of flask, wtforms and Flask-WTForms.
I have a page that displays a form and one is a select box with option option called "A".
When the app starts all is well. In a...
1
I have a User with a Location. Just as proof of concept the Location is a FormField within the CombinedForm which should be stored as a User Model. Eventually I want to have a fairly large number o...
1
I am using Flask, mongoengine for a project and I am trying to get basic stuff working from http://docs.mongodb.org/manual/tutorial/write-a-tumblelog-application-with-flask-mongoengine/
After impl...
Cariole asked 31/12, 2013 at 5:23
2
Solved
I would like Flask's "SubmitField" to use
<button type="submit" title="Save this form"><span>Save</span></button>
Instead of:
<input type="submit" title="Save this f...
Patrinapatriot asked 20/1, 2013 at 19:49
3
Solved
Is it possible to populate a password field in wtforms in flask?
I've tried this:
capform = RECAPTCHA_Form()
capform.username.data = username
capform.password.data = password
The form is defin...
1
Solved
In regular HTML, you can have multiple fields POST to an array:
<input type="text" name="arr[]">
<input type="text" name="arr[]">
<input type="text" name="arr[]">
<input type=...
3
Solved
I want to re-use a template I have with my WTForms form:
<th>${form.name.label}</th>
<td>${form.name()}</td>
...
However, on my edit page, I want the input fields to disp...
2
Solved
There is a real lack of documentation on how to work with WTForms' FieldList. So thanks to the internet I've been able to hack together the following:
Form:
class BranchForm(Form):
name = String...
1
Solved
In the Flask docs, the file upload example uses <input type="file" name="file"> then request.files['file'] to get the file. I'm using a WTForms FileField. How do I get the uploaded file when ...
Ec asked 16/5, 2015 at 18:47
1
Solved
I'm getting an incomprehensible error message when using validation for dynamic option (where options in one select field depend on the choice in the other selectfield. I can however not select a c...
Showthrough asked 20/4, 2015 at 15:3
2
Solved
I refactored my webapp and now my IDE pycharm marks some imports red. Why?
from wtforms import Form, TextField, validators, SelectField
My IDE marks the Form, TextField and the SelectField red as...
Wynellwynn asked 3/5, 2015 at 5:40
2
I'm using Flask and Jinja2 and I need to make an editable table with multiple rows.
This is what the table will look like:
And here's HTML for that:
<form action="/support/team-members-upda...
3
Solved
I am using WTForms for the first time.
Using WTForms to validate POST requests in Tornado
Below is my forms
forms.py
class UserForm(Form):
user = TextField('user', [validators.Length(min=23, max...
Exhibitionism asked 8/5, 2013 at 19:41
1
Solved
Here is my HTML dropdown menu. The value is the primary key of the child table.
<select id="category" name="category">
<option selected value="__None"></option>
<option valu...
Rocket asked 8/4, 2014 at 5:27
3
code in question:
from flask import Blueprint, render_template, abort
from flask.ext.wtf import Form
import os
from jinja2 import TemplateNotFound
from models import Member
from wtforms.ext.sqlalc...
1
I'm reading http://pythonhosted.org/WTForms/ but nowhere does it define the interface to a filter function, as in the filters= keyword argument to the Field() constructor. Elsewhere it says that th...
Faubourg asked 11/7, 2014 at 19:7
1
Solved
I'm building a website using the (awesome) Flask framework and the WTForms plugin. I now want to use show a Bootstrap tooltip on focus of an input field (working fiddle here), but for this I have t...
Flibbertigibbet asked 3/12, 2014 at 12:15
© 2022 - 2024 — McMap. All rights reserved.