close modal when clicking a form