title: Display combo box when checkbox is checked - Extjs
body: <p>I have setup a checkbox and a combobox and I am trying to set up a functionality - when a user checks the checkbox the combobox has to appear. I am new to extjs and I am having issues setting up the function for this functionality.</p>
  
  <p>Ext.onReady(function() {</p>
  
  <pre><code>var tests = [
      ['Test1'],
      ['Test3'],
      ['Test2']
  ];
  Ext.define('Testfile.model.Test', {
      extend: 'Ext.data.Model',
      fields: ['test']
  });
  var testsStore = new Ext.data.Store({
      model: 'Testfile.model.Test',
      proxy: {
          type: 'memory',
          reader: {
              type: 'array'
          }
      },
      data: tests
  });
  var form = Ext.create('Ext.form.Panel', {
      renderTo: document.body,
      bodyPadding: 10,
      width: 550,
      style: 'margin:16px',
      height: 300,
      title: 'Testing example',
      items: [{
  
            xtype: 'checkbox',
            name: 'system',
            boxLabel: 'Production (PACTV)',
            iputValue: 'production',
  
          listeners: {
              check: function (checkbox, isChecked) {
                      var sample = Ext.getCmp('secondComboID');
                  }
  
          }
      }, {
          xtype: 'combobox'
          fieldLabel: 'Select Test',
          id: 'secondComboID',
          store: testsStore,
          valueField: 'id',
          displayField: 'test',
          typeAhead: true,
          forceSelection: true,
          allowBlank: false,
          editable: true,
          triggerAction: 'all',
          lastQuery: ''
      }]
  });
  Ext.getBody().add(me.form);
  </code></pre>
  
  <p>})</p>
  
  <p>Can someone please suggest a fix to the script?</p>