HTML Submit Button Outside The Form

For a HTML form element you can put your submit button outside of the form element as long as you have reference the form’s id property with the button’s form property.

<div>
  <form id="a-form">
    <label for="name">Name:</label>
    <input type="text" name="name"></input>
  </form>

  <button type="submit" form="a-form">Submit</button>
</div>

Read more about forms here

Instagram Post