update formsubmit to close modals when properly filled out