1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    120
    Vote Rating
    2
    SuperRoo is on a distinguished road

      0  

    Default 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);

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    120
    Vote Rating
    2
    SuperRoo is on a distinguished road

      0  

    Default


    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});
    (where Mob2 is the appname & frmLogin is the ext.form.panel view.
    Then on the button a tap even is created that uses:
    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.

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,191
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Glad you got it going :-)
    Aaron Conran
    @aconran
    Sencha Architect Development Team