Fixed getFormValues

There was a problem that comes up when a form has multiple fields with
the same name. This fixes that.