refactor form field rendering