I'm trying to get the input of an input box in flask. I've set it manually in html, I can set it in python when running render_template, yet whenever I try to get the data within the input, it's always null.. Any ideas?
here's my input in HTML
<input name="carmodel" value="model3" id="carmodel" />
and here's my python code.
carmodel = request.form.get("carmodel")
print("printing carmodel: " + str(carmodel))
Here's the button I'm clicking, I'd like to get the input value when I click the button
<div class="mybuttonparent">
<form method="POST" action="/order">
<button class="btn" type="submit" name='{{trim.trim}}' value='{{trim.trim}}'>{{trim.trim}}</button>
</form>
</div>
yet when I check printing the variable in my code:
printing carmodel: None