title: Enable/disable textfield when a certain button is clicked on
body: <p>I have a disabled textfield and it is also readOnly and I am trying to get it where you click on a certain button and it makes the textfield enabled and not readOnly so the user can edit it. </p>
  
  <p>This is what I have for my code so far: </p>
  
  <pre><code>buttonid.on({'click': function (){
          if(Ext.getCmp('textfieldid').getForm().isDirty()){
              Ext.getCmp('textfieldid').setDisabled(false);
          }
          else{
              Ext.getCmp('textfieldid').setDisabled(true);
          }
      }});
  </code></pre>
  
  <p>This code is not working and I know there is a better way to do this.</p>