Only add input classes to form fields if they exist.