1. Three methods for obtaining 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.
Ii. How extjs assigns a value to textfield:
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 combo assignment when formpanel component loads data
Combo has the hiddenname attribute, which is the actually submitted value. When loading, you can set this attribute to reader and then automatically select the specified value, for example: hiddenname: 'value', your reader should have a {Name: 'value '}.
5. extjs form resetting method :
There are three ways to reset form forms. Assume 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 ();