Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% block content %}
- <div class="row">
- <div class="col-md-4">
- {{ wtf.quick_form(form) }}
- </div>
- </div>
- {% endblock %}
- from flask_wtf import FlaskForm
- from wtforms import StringField, PasswordField, BooleanField, SubmitField, TextAreaField
- from wtforms import HiddenField
- from wtforms.validators import DataRequired, Length
- class MyForm(FlaskForm):
- myhidden = HiddenField()
- textblock = TextAreaField('textblock', validators=[Length(min=0, max=2000)])
- submit = SubmitField('Submit')
- form = MyForm()
- ...
- return render_template('form.html', title='my form', form=form)
- form.myhidden = "test value"
Add Comment
Please, Sign In to add comment