Implement form submission for <input type=submit>

Partially fixes #3647