I have a form which is like
<form action="{{ url_for('my_form')}}" method="get">
<h2><td><input type="hidden" name="user_name" value="{{ user_name }}">{{ user_name }}</td></h2><br>
<button type="submit" class="btn btn-primary btn-lg" value="Submit">Submit</button>
</form>
And then on flask backend
@app.route('/my_form', methods=['GET'])
def my_form():
print request.form.items()
user_name = request.form['user_name']
print "exclusive request"
print "got user name ", user_name
But this doesnt work as the submit query becomes http://local_host/my_form?user_name=foobar <--- 400 error
which makes sense.. as the query url is my_form
So, the question is how to make a get form in flask?