The form will be submitted every time when user selects a new value. This is undesired behaviour because only explicit submit button must send the form
Reason
<button> html tag has the type property set to submit by default
Solution
Set type to button.
button: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.
Issue
If
select
element is wrapped inform
:The form will be submitted every time when user selects a new value. This is undesired behaviour because only explicit submit button must send the form
Reason
<button>
html tag has thetype
property set tosubmit
by defaultSolution
Set
type
tobutton
.MDN