i am creating a web page for mobile devices. In that there are few input fields which require user to always enter data in uppercase.
I looked at few options like
text-transformproperty of css
It changes user input to uppercase but it also changes the placeholder. That doesn't looks good.autocapitalizeattribute for input
By setting it on, it allows keyboard to open in caps. But this doesn't seems to work for me. It works perfectly withtextareabut not withinputin android.
Is there any better way to achieve this?
You should be able to bind to a keydown or keypress event (I'd use jQuery) and modify the input.
It won't affect the soft keyboard; maybe you can use this along with
autocapitalize?