extjs - Extjs4 - How to load check radiogroup from form.load -


i have form include radiogroup like

{  xtype: 'radiogroup',         fieldlabel: 'group',         name: 'a',         items: [{             boxlabel: '1',             name: 'a',             inputvalue: '1'         }, {             boxlabel: '2',             name: 'a',             inputvalue: '2',          }, {             boxlabel: '3',             name: 'a',             inputvalue: '3'         }]     } 

i using

form.load({               url: 'example.php', ....}); 

my json like

{     success:true ,     data : {        a:'2'         } }  

but nothing work. how fix thanks

the problem name attribute on radiogroup. shouldn't there @ or can name else.

    xtype: 'radiogroup',     fieldlabel: 'group',     name: 'a'  <--- remove 

here code sample in fiddle. instead of load() method on form using setvalues method on formbasic becuase don't have server load data from. works in same way. http://jsfiddle.net/dbrin/jmmhz/

essentially problem is looking first input element match name of input value , finding radiogroup instead of individual radio.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -