Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created March 10, 2020 13:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Porter97/da3a635b8309d4d2f82b0a74f7571b41 to your computer and use it in GitHub Desktop.
#...
from wtforms import StringField, TextAreaField, BooleanField, SelectField,\
SubmitField, HiddenField
#...
class ContentForm(FlaskForm):
collection = SelectField(label='Collection', render_kw={'class': 'input-field'}, coerce=int, validators=[DataRequired()])
image = HiddenField(id='image')
title = StringField(label='Title', id='title', validators=[DataRequired()])
description = StringField(label='Description', id='description')
url = StringField(label='URL', id='url', validators=[URL(), DataRequired()])
submit = SubmitField('Submit')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment