First, three ways to get field from form:
1, ext.getcmp (' id ');
2, Formpanel.getform (). FindField (' Id/name ');
3, Ext.get (' id/name ');/The premise is that Formpanel is displayed on the interface.
Two, ExtJS how to give TextField three methods to assign a value:
var value= "value";
1, Fs.form.findField (id/name). SetValue (value);
2, Ext.get (Id/name). SetValue (value);
3, ext.getcmp (ID). SetValue (value);
Iv. automatic assignment of combo when Formpanel component load data
Combo has a hiddenname attribute, which is the actual value of the commit, and when you load this property into reader, you can automatically select the value you specify, such as: hiddenname: ' Value ', Then you should have a {name: ' value '} in your reader.
Five, ExtJS reset the form method:
There are three ways to reset form forms, assuming Var fs=new Ext.form.FormPanel ({...});
(1) Fs.form.reset ()//Reset Form
(2) Fs.getform (). Getel (). Dom.reset ();//Reset Form
(3) EXT.GETCMP (' FS '). Form.reset ();
Originated from: http://www.cnblogs.com/lidabo/archive/2013/02/19/2917876.html