Good question. And the very same one that I had.
Here’s something new I learned:
If I have a button anywhere on the same page as my form, then that button decides that it wants to submit that form. Even if I have a submit button within the form.
Put type=”button” on the button. Then the browser knows that it’s a button:
<button type="button">Random button somewhere on the page</button>
You’d think that the fact that the element is called ‘button’ would be enough of a clue.