Forms: fixed detection of submitted form; POST data can be empty [Closes #1026]