I have used the following properties to make an textfield and disable it for user edit.
disabled: true
below is my code for the Xtype decleration.
xtype : 'passwordfield',
name : 'password',
id: 'password',
disabled: true,
label : 'Password',
placeHolder :'Password',
useClearIcon : false
it appears something as shown in below image. The label is grayed out. Please let me know how can i make it non-editable and label will remain same.
Edit-1: After, Couple of searches in Stack overflow and sencha forum i have found the below code which is able to make my text field non-editable but now it is static in nature.
listeners: {
afterrender: function(ele) {
ele.fieldEl.dom.readOnly = true;
}
}
We can set the property one time, but it doesn't have any method to set dynamically. I need dynamically as i have to sometimes make user to edit and sometimes to make it. disabled.
Any other approach to make text field non editable in Sencha Touch is appreciated.