-
16 Apr 2012 10:12 PM #1
Accessing form variables
Accessing form variables
Hi,
I am following the "Using Forms" in Sencha Touch 2 but am using the designer.
How do I access the fields in the fieldset when the button is pressed. In the example, everything is done by code with a variable assigned to the formpanel...in the designer there is no variable.
How do I access the values in the designer....I had the button fire this statement.
Ext.Msg.alert('Form Values',JSON.stringify(formPanel.getValues()),null);
-
17 Apr 2012 8:51 PM #2
Found the problem....too used to visual studio.
I have a panel with a fieldset, text field, password field and button on it.
It is opened by the launch function:Mob2.view = Ext.create('Mob2.view.formLogin', {fullscreen: true});Then on the button a tap even is created that uses:
(where Mob2 is the appname & frmLogin is the ext.form.panel view.var vals = JSON.stringify(Mob2.view.getValues(), null, 2);This returns the json string of username, password....which is what I am after.
Works great...now I have to get the VS2010 MVC login service going.
Architect 2 is a great app.
-
17 Apr 2012 11:15 PM #3
Glad you got it going :-)
Aaron Conran
@aconran
Sencha Architect Development Team


Reply With Quote