Results 1 to 3 of 3

Thread: Change form field to readonly dinamically

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User hectorgomis's Avatar
    Join Date
    Feb 2013
    Location
    Spain
    Posts
    44
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Change form field to readonly dinamically

    I new to show a view, and before to paint, I need to change every field of the form to readOnly = true. It looks like is simple, but I don't know how to do it.

    Here my controller
    Code:
    this.getMyForm().items.each(function(f){
        f.readOnly=true;  //not working!!!!
    });
    Thanks!

  2. try
    Code:
    Ext.each(
      this.getMyForm().query('textfield'), 
      function(field){
        field.setReadOnly(true)
     }
    )

  3. #2
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693
    Answers
    21
    Vote Rating
    12
      1  

    Default

    try
    Code:
    Ext.each(
      this.getMyForm().query('textfield'), 
      function(field){
        field.setReadOnly(true)
     }
    )

  4. #3
    Sencha User hectorgomis's Avatar
    Join Date
    Feb 2013
    Location
    Spain
    Posts
    44
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Perfect!!! It's working! Thanks!!!

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
  •