Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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',

Anyone have any ideas or pointers in the right direction?

Thanks very much for your time!


— asked March 25th 2010 by Chris Cowdery-Corvan
  • field
  • password

2 Answers

  • Accepted Answer

    Add passwordMask:true, to your textField. Iphone UI Controls

    — answered March 25th 2010 by Kurt Gailey
    • On Adroid this does'n work for me…

      — commented September 25th 2011 by M. S.
    • Thanks..Am also got the answer for my question :)

      — commented November 1st 2011 by Marimuthu Govind
    • thanks.. work fine…

      — commented February 16th 2012 by Tarun Kasera
    • Works for me … on both iOS 6 and Android 2.3.3 & 4.0.4

      — commented October 22nd 2012 by Robin Stoker
    • What for android?

      — commented December 13th 2013 by Krupa Patel
  • Beautiful. Thanks very much Kurt!

    — answered March 25th 2010 by Chris Cowdery-Corvan
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.