Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iterate through form fields in Sencha Touch 2

I'm trying to rewrite a sencha touch application from version 1.1 to version 2.

In st 1.1, i'm looping through form fields this way:

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

In st 2, this.fields is null. Is there another way to get fields list inside a form panel ?

Thanks in advance,

like image 374
ridan Avatar asked Dec 04 '25 11:12

ridan


1 Answers

you can try this

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

or

this.getFieldsAsArray().forEach(function(field) {
     // code here
});
like image 186
Saket Patel Avatar answered Dec 09 '25 04:12

Saket Patel