condensed and improved code repeated for each control type, added 'tel' control type
condensed and improved code repeated for each control type, added 'tel' control type

dperini/nwxforms,ryanmitchell/nwxforms,dperini/nwxforms