Resources for prepopulated form fields (country, county, DOB, height, weight etc)

Does anyone know any good resources for already compiled data for common fields in forms like country, date of birth, height, weight etc?

I found a CSV resource from Paul Stenning at http://www.paulstenning.com/uk-towns-and-counties-list/ which is quite useful for UK towns, counties and countries.

For a list of countries, a quick Google search comes up with results. This one has a list of countries in a few useful formats:-

For DoB, height and weight, I’m not so sure I would pre-set data for those.
With DoB the list would be extremely long, even if dealing with a narrow age range. In a form input maybe using a date type input would be better. The downside to that is the date type does not yet have universal browser support.
Another approach is to split it into 3 fields for day, month and year. These could be number type inputs with min and max attributes set appropriately, days: 1 - 31, months: 1 - 12, years can be set according to your target age range if you were dealing specifically with either children or adults. Or you may want a drop-down list for months, but that’s easy enough to do.

For height and weight, again just number type inputs with min and max set to a realistic range for your chosen units of measure.
If using feet & inches for height, you may split into two number inputs, with inches on a min - max range of 1 - 11 and feet as you see as realistic.

1 Like

Thanks for the reply - very useful.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.