2021-11-23 13:00:03 +00:00
|
|
|
from flask_wtf import FlaskForm
|
|
|
|
from wtforms import StringField, PasswordField, BooleanField
|
2021-11-24 17:17:56 +00:00
|
|
|
from wtforms.validators import InputRequired, Email, Length, Optional
|
2021-11-23 13:00:03 +00:00
|
|
|
|
|
|
|
class StartQuiz(FlaskForm):
|
2021-11-24 17:17:56 +00:00
|
|
|
first_name = StringField('First Name(s)', validators=[InputRequired(), Length(max=30)])
|
|
|
|
surname = StringField('Surname', validators=[InputRequired(), Length(max=30)])
|
2021-11-23 13:00:03 +00:00
|
|
|
email = StringField('Email Address', validators=[InputRequired(), Email(message='You must enter a valid email address.'), Length(max=50)])
|
2021-11-24 17:17:56 +00:00
|
|
|
club = StringField('Affiliated Club (Optional)', validators=[Optional(), Length(max=50)])
|
2021-11-25 23:12:20 +00:00
|
|
|
test_code = StringField('Exam Code', validators=[InputRequired(), Length(min=14, max=14)])
|
2021-11-24 17:17:56 +00:00
|
|
|
user_code = StringField('User Code (Optional)', validators=[Optional(), Length(min=6, max=6)])
|