Refactor to use form submission.