Fixed issue when form input has no "name" attr.

Thanks to a-le on GitHub for reporting the problem and proposing the
solution.