The form attribute
The form attribute associates the form element with the form tag.
This is needed when the form element lies outside the form tag, but must be sent to the server along with the contents of this form tag.
For example, you have a button submit, but according to the design it is located in a completely different place on the page. In this case, the attribute form will solve the problem: we assign this attribute to the button, specifying in it the value of the attribute id from the desired tag form. After these manipulations, the button will send the bound form.
You can bind not only buttons, but also any other form elements.
Example
In the following example, the button is outside the field, but is linked to it via the form attribute:
<input type="submit" form="test">
<form id="test">
<input type="text" name="age">
</form>
: