Sencha Touch version tested:
  • 1.0.1a ____
  • only default sencha-touch.css




Platform tested against:
  • iOS 4
  • Chrome 9


Description:
  • When you have a inputfield that is an array like: fieldname[key][optional.][optional.], Sencha Touch will try to perform a isChecked function, because it expects an checkbox.


Test Case:

Code:
    var myPanel = new Ext.form.FormPanel({
         
        items: [{
            xtype: 'textfield',
            name: 'mytextfield[0][]'
        }, { 
            xtype: 'textfield',
            name: 'mytextfield[0][]'
        }]
    });
Steps to reproduce the problem:
  • Create a formpanel object
  • Add a textfield to this formpanel with an array-like name
  • Request the formvalues with formPanel.getValues();
  • See it go in flames


The result that was expected:
  • It should give me back an array of textfields or maybe group it inside the textfield


The result that occurs instead:
  • Uncaught TypeError: Object [object Object] has no method 'isChecked'


Possible fix:
  • temporary fix for current applications is to extend the formpanel class in which you override the getValues() function and check whether the field Object has an function 'isChecked'
  • permanent fix: rewrite the getValues to allow array-like textfields