Iterating through form fields in Sencha Touch 2

I am trying to rewrite an app with senches from version 1.1 to version 2.

In st 1.1, I go through the form fields like this:

this.fields.each(function(field) {
     // Code here
}, this);


In st 2, this field is null. Is there any other way to get a list of fields inside a form bar?

Thanks in advance,


source to share

1 answer

you can try this

var fields = this.getFieldsArray();
Ext.each(fields, function (field) {
       // code here
}, this);



this.getFieldsAsArray().forEach(function(field) {
     // code here




All Articles