Now that this is a form, we can listen to the submit event instead of the click event in the js code.