View Full Version : How to show/hide password in forms

Luca Basile
7 Jun 2011, 12:33 AM
Hi everyone,
i'm new on sencha touch and i'm trying to create a form starting from sencha touch examples; i would like to add a hide/show password button, but i can't figure out a way to do it starting from API's documentation.

I googled a lot and found some advices that just didn't work well enough.
I'd like to alter an xtype passwordfield : the basic idea is to modify input type but if i try with a getcmp().getEl() combo i just access to parents nodes of the HTLM code and it's impossible to modify the childs of the xtype without a knowledge of childs Ids.
Obviously i'm missing something : anyone can help?

Luca Basile
7 Jun 2011, 3:22 AM
I solved the question by myself using child() function to access inner html nodes and modifying the input attribute.
It works well now, but i think this feature must be already included in form field methods, and i'd like to know if my guess has a real match.
So if anybody knows a compact way to change an xtype textfield in a xtype passwordfield...please answer on this thread!

14 Sep 2011, 1:11 AM
Hi Luca,

I am also triying to access the input part of a text field component.

Can you explain how did you use the child function?


30 Oct 2011, 10:47 PM
just like this,

Ext.select(".passwordField input").set({type:"text"});