inputType change at runtime


#1

Is it possible to change the input type of a text box at runtime?


#2

Sure.

For jQM:
$("#TextBox1").attr("type", "password")

For Bootstrap:
$("#Input1 input").attr("type", "password")

Be aware of potential impact the change may have on other attributes if originally deployed with them (e.g. min and max attributes wouldn’t work if the type is changed from "number" to "text").

Kind regards,
Doug


#3

It’s great thank you very much.