New in HTML5.

<input formmethod="

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
How To Use Input To Create Form Fields In HTML: Easy Tutorial
What does <input formmethod=" do?
Specifies the HTTP method (GET or POST) to be used when the form data is submitted to the server. Only for use on input types of "submit" or "image".

Using `formmethod”

The formmethod attribute specifies the HTTP method (GET or POST) which will be used when the form is submitted. This can also be specified for the form within the <form> element, using the method attribute — in fact, the options are exactly the same. Using formmethod on the submission input can take the place of the <form> attribute, or override it. It is hard to think of any compelling use cases for this attribute. The only sensible reason to specify the method at the level of the submission button (instead of the <form>), is if you wanted to provide multiple submission buttons with different HTTP methods. However, that gives the user an option that probably is not best left up to the user. Perhaps in experimental or test applications, or in some particularly advanced use case, this might be a useful attribute. However, in general, you should probably just specify the HTTP method using the <form method=""> attribute.

Adam is a technical writer who specializes in developer documentation and tutorials.

Browser Support for formmethod

iefirefoxchromeedgesafariopera
11434513934