Results 1 to 2 of 2

Thread: Getting value of label using foem.findField() method

  1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    21
    Vote Rating
    1
      0  

    Default Unanswered: Getting value of label using foem.findField() method

    Hi,

    I am using a label in a form. I want to set the value of the label dynamically. I tried using form.findField('labelName'). But it doesn't seem to work. What is the correct way to retrieve the value of the label present in the form? Using Ext.getCmp('labelId'), we can achieve this, but I wanted to use something like form.findField('labelName'). Also I observed using firebug but my form didn't show the label in the _fields property. Can there be a way to achieve this?

    Thanks

  2. #2
    Sencha User
    Join Date
    May 2012
    Location
    Colombia
    Posts
    46
    Answers
    2
    Vote Rating
    4
      0  

    Default

    Code:
            fldset = form.getItems().items[1];
            myfield = fldset.innerItems[0]; 
             myfield.setLabel('anything');

Tags for this Thread

Posting Permissions

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