it seems that the username field cannot be deleted when logging in.
BUT I only need email and password to log in.
And I don not want my user to input so much info.
class LoginForm(FlaskForm):
next = HiddenField() # for login.html
reg_next = HiddenField() # for login_or_register.html
username = StringField(_('Username'), validators=[
validators.DataRequired(_('Username is required')),
])
email = StringField(_('Email'), validators=[
validators.DataRequired(_('Email is required')),
validators.Email(_('Invalid Email'))
])
password = PasswordField(_('Password'), validators=[
validators.DataRequired(_('Password is required')),
])
it seems that the username field cannot be deleted when logging in. BUT I only need email and password to log in. And I don not want my user to input so much info.