My form cannot be submitted when I make some fields required