Don't serialize form fields without a `name` attribute

Fixes #1016, closes #1017