About Submit Buttons Outside of Forms

You can place a submit button outside a form and refer to the form by its id with the form attribute.

1
2
3
4
5
<button form="id_my_form">Save</button>

<form id="id_my_form" action="" method="post">
...
</form>

Tips and Tricks HTML5