Handle cases where no type is set but the form contains an input field with the name "method". Fixes #2585