Glossary

Form action defined.

The action attribute of an HTML <form> tag holds the URL the browser sends the submission to. When the visitor hits submit, the form's field data goes to that address.

Definition

How the form action attribute works

The action attribute is the form's forwarding address. It works as a pair with method: action says where the submission goes, method says how. GET appends the fields to the URL as a query string, POST carries them in the request body. A form that sends data somewhere should use POST, so the fields travel in the body rather than ending up in URLs, logs and browser history.

Action accepts any URL. If you leave it out, the browser submits to the current page's own URL, which only works when a server at that address is expecting form data. On a static site there isn't one, so the page just reloads and the submission evaporates. That's why static-site forms point action at a form backend: the tag becomes action="https://api.formwire.com/submit" method="POST", a hidden access key identifies your account, and the service on the other end takes the submission from there.

Related questions

Want to see it working?

Read the docs
Ready in a minute

Give your form an action worth pointing at.

Free tier forever. No credit card required.