View Full Version : numberfield ReadOnly

5 Feb 2013, 2:41 AM
Setting readonly to true for numberfield in form will hide buttons for changing values, but it can still be changed by clicking on text-input and using keyboard to manually provide new value (this input field on form should also have readonly set).

5 Feb 2013, 7:45 AM
Hi Rssoll,

readOnly config work fine for me, which framework are you used ?
here is working sample example - http://jsfiddle.net/maneeshgo/YXtTy/

5 Feb 2013, 8:22 AM
Thanks for the answer!
I can't really reproduce this error with jsfiddle, but it looks more similar to this:

I run some other tests and I know that if I put config 'testReadOnly' default value to true it works fine. If I pass value during construcion:
Ext.widget('MyView', {testReadOnly: true});

then all fields are readonly except numberField that can be changed with keyboard.

5 Feb 2013, 8:45 AM
You are setting a property .. try calling a method .. setReadOnly()


6 Feb 2013, 4:12 AM
Okay, my fault, sorry guys. I had during construction config set to 'true' instead of true. The type got mixed up and my only excuse is that it worked for few fields and caused me quite a confusion (super effective ;)). I don't know if it is a bug or not, but thanks for help ;)

Reproduced effect: