Ext.form.field.File disable button

I have the following file field:

{
    xtype: 'filefield',
    name: 'photo',
    fieldLabel: 'Photo',
    labelWidth: 50,
    allowBlank: false,
    buttonText: 'Select Photo...'
}

      

I am trying to disable the file field button:

if (f instanceof Ext.form.field.File) { //f is a field in my form
    f.button.setDisabled(true)
}

      

This works as I expect visually, but after enabling this button, the button handler is no longer called.
I can hear what you think. Why don't you call setDisabled()

on the field? .. because the form won't submit its value if the field is disabled. And I implemented my own way to disable elements using CSS.

My question is: How can I disable a button filefield

in ExtJS 4.1.2?

+3


source to share


2 answers


It seems like a bug in ExtJs 4.1.



This is allowed in ExtJS 4.1.3

0


source


Why not put a little mask on the button? It could be controlled manually.



0


source







All Articles