Fix #5622 - fix roojs dynamic example
[roojs1] / examples / form / dynamic.js
index ba7516f..0534df9 100644 (file)
@@ -253,6 +253,9 @@ Roo.onReady(function(){
                         name: 'scountry',
                         //vtype:'email',
                         width:225,
+                        valueField :'code',
+                        displayField  : 'title',
+                        emptyText : 'Select a country',
                         store: {
                              xtype : 'Store',
                              xns: Roo.data,
@@ -269,7 +272,7 @@ Roo.onReady(function(){
                                  totalProperty: 'totalCount',
                                  id: 'post_id',
                                  fields : [
-                                     'id', 'name'
+                                     'code', 'title'
                                  ]
                              }
                          },
@@ -302,7 +305,7 @@ Roo.onReady(function(){
     mform.addButton('Save');
     mform.addButton('Cancel');
 
-   
+   /*
     mform.render('form-ct2');
     mform.setValues({
         country  : 'AK,LA',
@@ -310,6 +313,7 @@ Roo.onReady(function(){
         countrylist  : 'AG,AZ',
         countrylist_names : 'Antigua and Barbuda,Azerbaijan'        
     });
+    */
     /*
      * ================  Form 3  =======================
      */