Fields must have a name attribute for getFields to work