I have password and confirm password fields that I want to display *********
in until the field gets focus.
var passwordFields = {
layout: "vbox",
border: 0,
defaults: {
xtype: "textfield",
inputType: "password",
labelAlign: "top",
emptyText: "********",
validateOnChange: false
},
items: [{
fieldLabel: "Password",
name: "pass",
allowBlank : false,
itemId: "pass"
}, {
fieldLabel: "Confirm Password",
name: "pass-cfrm",
allowBlank: false,
initialPassField: "pass"
}]
};
do I need to add an onfocus
handler in order to make the emptyText go away when the field is in focus but the user hasn't typed anything or is there an easier way that I'm missing?
edit:
I added the following code to the controller which sets the value as needed depending on a flag but was hoping that the default behavior of the emptyText would be that it disappears onfocus and reappears after onblur if the field is empty...
var field = this.getPassField();
field.emptyText = "••••••••";
field.applyEmptyText();
This issue can be resolved though the feature
inputType:'password'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With