i want to use the data in the same page which is fetched from the integer field in python flask

Viewed 28

I created the integer field using flask_form.. this is the code

class PurchaseItemForm(FlaskForm):
    quantity = IntegerField(widget=NumberInput())
    submit = SubmitField(label='Purchase Item!')

this is the html syntax

<h4>
    Quantity
    {{ purchase_form.quantity(min=1, placeholder=3, id=quantity) }}
</h4>

<h4 class="text-center">
    Are you sure you want to buy {{ purchase_form.quantity.data }} products ?
</h4>

it returns None when I use this syntax -> purchase_form.quantity.data
plz help me

0 Answers
Related