0
votes

I am using python flask_wtf to create forms. I have a design ready but I want to put image as flask submit button instead of html submit button.

Submit Button

Currently Using the below code to display the image.

HTML CODE: 

<input class="input-field" type="image" src="./images/next.png" alt="Submit" style="width: 200px;">
PYTHON CODE:

class RegistrationForm(FlaskForm):
    username = StringField('USER-ID', validators=[DataRequired(), Length(min=2, max=20)], render_kw={"placeholder": "USER-ID"})
    email = StringField('EMAIL-ID', validators=[DataRequired(), Email()], render_kw={"placeholder": "EMAIL-ID"})
    password = PasswordField('PASSWORD', validators=[DataRequired()], render_kw={"placeholder": ""})
    confirm_password = PasswordField('CONFIRM PASSWORD', validators=[DataRequired(), EqualTo('password')], render_kw={"placeholder": "CONFIRM PASSWORD"})

# But i want THAT BUTTON TO BE GENERATED FROM HERE rather than using HTML tags.