Getting started: Adding a password field
I've been poking around Google, this Q&A section and the Docs, and thus far I haven't had much luck answering (in my mind anyway) a very simple question :)
I'm trying to add a password form field to my app (this could be done with a textField, but I'd prefer to do things the right way if at all possible), and I'm not entirely sure where the docs are for that.
I believe it's possible as I've seen other Titanium apps like Grub.it do this with great finesse.
Here's the code I have currently:
var passwordField = Titanium.UI.createTextField({
hintText:'enter password',
height:35,
top:100,
left:30,
width:250,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
});
Anyone have any ideas or pointers in the right direction?
Thanks very much for your time!
-Chris
2 Answers
-
Accepted Answer
Add
passwordMask:true,
to your textField. Iphone UI Controls -
Beautiful. Thanks very much Kurt!