Titanium Community Questions & Answer Archive

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

Masked Text Input

Is there any way to set a text input to masked?

Like the way you would input a wep key.

— asked May 14th 2010 by John Welch
  • input
  • key
  • masked
  • pin
  • text
0 Comments

2 Answers

  • Accepted Answer

    Hey John,

    I don't see it in the documentation but textfield has a passwordMask property so just set it to true and it should do what you're after.

    var tf1 = Ti.UI.createTextField({
        autocapitalization:Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,
        width:300,
        borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
        passwordMask:true,
        hintText:'Enter your password'
    });
    
    — answered May 14th 2010 by Dan Giulvezan
    permalink
    0 Comments
  • Thanks!

    — answered May 14th 2010 by John Welch
    permalink
    0 Comments
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.