-
5 Apr 2012 6:49 PM #1
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.
-
6 Apr 2012 5:42 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
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.
-
9 Apr 2012 11:21 AM #3
Fixed for the next release. Thanks.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
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).


Reply With Quote