Changes the type of the input field