Added ability to set the input element type.