Reading a Button's Value on Submit (opens in new tab)
Complex HTML forms often end up with multiple submit buttons. Consider a form for taxes: there’s a button to save a draft and another button to submit for processing. They both trigger the submit action on the same form. How could we accomplish this while keeping the buttons fairly simple? One solution is to set the buttons’ value: Then in the submit handler...
Read the original article