liveBook · Manning

Action attribute

As explained in A Pythonic Adventure: From Python basics to a working web app

An action attribute is an HTML form attribute specifying the address to which submitted form data is sent.

An action attribute tells the browser where to send form data after submission. In a coffee-order form, action="/order" sends the selected drink to the /order address for processing. section 10.0

Sending a drink order

A form with Coffee and Decaf options uses action="/order" and method="post". Flask receives the submission at /order, reads the drink value, and can print or display the order.

How A Pythonic Adventure: From Python basics to a working web app covers it

How deep it goes
Connects HTML markup to a Flask route and POST handling, but does not extend into storage or database processing.
Examples
Uses a coffee-or-decaf menu, the /order target, and confirmation and New order templates.
What it assumes
Assumes a basic HTML form and introduces how its submitted values reach a web application.
What you can do after
Operate/configure a form that sends a selected value to a Flask endpoint for processing and display.
How it connects
Connects HTML forms, Flask routes, POST requests, request data, and templates.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of A Pythonic Adventure: From Python basics to a working web app. The section links point to the parts of the book it draws on.