added a form_submit function that prevents multiple form submits