Readonly property on the SenchaTouch field

Hi, I was looking for the readOnly property for a field in secnhatouch, but could not find it ... can anyone help me on this issue

{
                 xtype: 'textfield',
                 name: 'ReferenceNumber',
                 readOnly:true,
                 label: 'Reference'
}
+5
source share
3 answers

I think you want to disable the field

{
    xtype: 'textfield',
    name: 'ReferenceNumber',
    **disabled**: true,
    value: '12312421',
    label: 'Reference'
}

I overload 'disabledCls' because it highlights the shortcut more than I want.

+2
source

I ran into the same problem when I was readOnly: truen’t working - I managed to fix this by adding a listener afterrender:

{
    xtype: 'textfield',
    name: 'ReferenceNumber',
    label: 'Reference',
    listeners: {
        afterrender: function(ele) {
            ele.fieldEl.dom.readOnly = true;
        }
    }
}
+8
source

I was able to fix this by installing readOnly: nullor readOnly: undefined:

{
    xtype: 'textfield',
    name: 'Website',
    label: 'Website',
    readOnly: null
}
0
source

All Articles