I an trying to use a button in a form in my html, however, when I try to get the value of the clicked button in flask it returns none for some reason, I had the same problem in my code previously but it disappeared magically and I don’t think that it will this time,
this is my html

{% if x[4] == 0 %}
            <form action="/click">
                <button name="doneBtn" class="habits" style="background-color: {{x[2]}};" value="{{x[0]}}">
                    <p class="btnText content">{{x[1]}}</p>
                    <i class="{{x[3]}} habitIcons content"></i>
                </button>
            </form>

and this is the flask code

@app.route("/click")
def click():
    id = request.form.get("doneBtn")
    print(id)
    cursor.execute("UPDATE info SET clicked = 1 WHERE id = ?", [id])
    return redirect("/")

x is a dictionary cause I am in a jinja loop, and id is the value of the button (x[0])