Form Fields via request.form
Pull values from submitted HTML forms.
Forms Send Data in the Body
When an HTML form posts, the field values travel inside the request body, not the URL, so request.args will not find them.
Meet request.form
For posted form fields Flask gives you request.form, a dict-like object keyed by each input name on the page.
name = request.form["name"]All lessons in this course
- Query Strings via request.args
- Form Fields via request.form
- JSON Bodies via request.get_json
- Headers, Cookies, and the Client IP