Adjusted populateFormFields to handle html5 input types