Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2685 in Sprint 21 (2.0.1).
  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    1
    derekbal is on a distinguished road

      0  

    Default radiofield with value of 0 returns boolean true instead of 0.

    radiofield with value of 0 returns boolean true instead of 0.


    If you have a couple set of two radiofields with the same name, one having a value of 0 and the other a value of 1, when the radiofield with the value of 0 is checked, the value shown in form.getValues() is a boolean true. Any other integer value works properly except for 0.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report

    Code:
    new Ext.form.Panel({
        fullscreen : true,
        items      : [
            {
                xtype : 'radiofield',
                name  : 'test',
                value : 0,
                label : 'Zero'
            },
            {
                xtype : 'radiofield',
                name  : 'test',
                value : 1,
                label : 'One'
            },
            {
                xtype   : 'button',
                text    : 'Get Values',
                handler : function(button) {
                    var form   = button.up('formpanel'),
                        values = form.getValues();
    
                    console.log(values);
                }
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,156
    Vote Rating
    4
    rdougan is on a distinguished road

      0  

    Default


    Fixed for the next release. Thanks.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Tags for this Thread