From 14f6b5800512af53fb7d1d9bfeeddcce894ecadf Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Thu, 3 Jun 2021 22:44:14 +0530 Subject: added form support --- app/forms/app_forms.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/forms/app_forms.py (limited to 'app/forms/app_forms.py') diff --git a/app/forms/app_forms.py b/app/forms/app_forms.py new file mode 100644 index 0000000..92913d6 --- /dev/null +++ b/app/forms/app_forms.py @@ -0,0 +1,10 @@ +from flask_wtf import FlaskForm +from wtforms import StringField, TextAreaField +from wtforms.fields.html5 import EmailField +from wtforms.validators import DataRequired, Email + +class MyForm(FlaskForm): + name = StringField('Name', validators=[DataRequired()]) + email = EmailField('Email', validators=[DataRequired(), Email()]) + subject = StringField('Subject', validators=[DataRequired()]) + body = TextAreaField('Message', validators=[DataRequired()]) \ No newline at end of file -- cgit v1.2.3