Added events on valid and invalid form submit