How do I know if a form is submitted?