Results 1 to 2 of 2

Thread: readOnly does not work

  1. #1
    Sencha User
    Join Date
    Oct 2007

    Default readOnly does not work

    Hi all,
    I have hiddenfields in form like this:
    xtype: 'hiddenfield',
    name: "userName",
    readOnly: true,
    bind: {
    value: '{user.userName}',
    but when form.reset(), hiddenfield value is empty, readOnly not work. how do I prevent reset empty hiddenfield value? Thanks.

  2. #2
    Sencha User
    Join Date
    Feb 2017


    This happens when your value is binded, on a static value it doesn't reset. Also, readOnly prevents visual editability, you can still change the value of the field programmatically(and this is what form.reset() does). Anyway i don't know why Ext resets binded(and not static) value(if it isn't a bug). But there is a solution by using fields 'change' event and preventing it:

Similar Threads

  1. Replies: 1
    Last Post: 16 Mar 2015, 3:54 PM
  2. Replies: 1
    Last Post: 1 Feb 2013, 5:41 AM
  3. Does set and get readOnly work?
    By crgrah in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 9 May 2012, 2:56 PM
  4. Replies: 14
    Last Post: 1 Mar 2010, 9:37 AM
  5. [FIXED] CheckBox Readonly Doesn't Work
    By nathan.modrzewski in forum Ext GWT: Bugs (1.x)
    Replies: 4
    Last Post: 12 May 2008, 6:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts