adding required html attributes to form fields