New in HTML5.

<input form=””>

Sharing is caring!

Attribute of
How To Use Input To Create Form Fields In HTML: Easy Tutorial
What does <input form=""> do?
Specifies a form to which the input field belongs.

Code Example

<form id="form-demo"></form>
<label for="name">Name</label><br>
<input name="name" form="form-demo">

Last Updated on

Fields outside the <form>

The purpose of the form attribute is to allow an <input> field to be associated with a form without having to be contained within the the <form> element. This may come in handy for complex web application layouts, but is not generally something you want to use in most standard form use-cases.

Not fully supported

Also, it is important to notice that this feature is not supported (as of this writing) in either of Microsoft's browsers, Internet Explorer or Edge. As there is no “graceful fallback” here, and having form fields accidentally excluded from submission could cause serious problems, this feature is probably best avoided.

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

Browser Support for form

Not supported.4345Not supported.934