All Buttons Are Submitting Form

Posted By Weston Ganger

All buttons in forms default to type="submit"

To make buttons in your form that dont submit the form such as a cancel button add type="button":


<form>
  <button type="button"> Cancel </button>
  <button> Submit </button>
</form>

Article Topic:Software Development - HTML / CSS

Date:August 20, 2014