Don't want to pull request this yet because I'm not sure if this will screw up other forms generated by form.php. I can't imagine it would, or they might even suffer from the same problem, so I'll just leave this here until I hear further discussion.
https://github.com/NReilingh/dokuwiki/commit/d4cf86b8ec4cca2077b34a22943b8c3a4b3c5aed