HTML <input> Tag with the 'form' Attribute

<input form="myForm" name="myInput">

<form id="myForm" action="https://www.PuStudy.Com/resources/html-forms-action.html">
<button>Submit</button>
</form>

In the above example we add the form attribute to an <input> element. We also add the actual <form> element that the input is using.

The form attribute allows you to specify the ID of a form to which this control belongs. This allows you to use the <input> element without having to nest it within <form> tags.

If this attribute is used, its value must be the ID of a form element in the element's owner.