Add submit handler to new javascript form to prevent double submission.