instead of catching click and enter events, catch the form submission event