get the value of checked radio button in Sencha Touch.

Hi Expert,

How to get the value of checked radio button in Sencha Touch.

Thanks in advance for any recommendations or solutions.
Last updated:6/25/2013 12:45:48 AM

1 Answers

Sumit Kesarwani
Sumit Kesarwani

Hi Aaron,


To get the value of checked radio button in sencha touch, first add a groupValue to the radio button and then get the group value through the getGroupValue() method, like this:
        var centre = Ext.ComponentQuery.query('radiofield[name=Centre]');

        Ext.Msg.alert('Selected Centre', centre[0].getGroupValue());


If you want to learn more about radio button, then you can read my article:

http://www.mindstick.com/Articles/56bc0549-243a-40f9-83d4-63161fe68e38/?Radio%20Button%20in%20Sencha%20Touch

Answer