Use actual select elements for dropdowns.

This avoids some weird behaviours with the select2 plugin.

Fixes bugs 2732 and 2733.