title: Kendo-UI - Creating a Dynamic Form via JSON
body: <p>I have been able to successfully build out a dynamic form using JSON and Kendo.Observable, however I cannot initialize the dropdownlist values successfully within the same JSON.  The only way I can get it to work is by binding the dropdown lists to a separate json request after creation.  See the example below....</p>
  
  <p>Here is an example of some JSON that works (no dropdown list)</p>
  
  <pre><code>{"fields": [
                  {"name" : "FirstName", "label" : "First Name", "type" : "text", "css" : "test"},    
                  {"name" : "LastName", "label" : "Last Name", "type" : "text", "css" : "test"},
                  {"name" : "Email", "label" : "Email", "type" : "text", "css" : "test"},
                  {"name" : "Phone", "label" : "Phone", "type" : "text", "css" : "test"},
                  {"name" : "Subscribed", "label" : "Subscribed", "type" : "checkbox", "css" : "test"}
                  ]}
  </code></pre>
  
  <p>Here is an example where I have added a dropdown, not going to post the whole thing, I have tried a number of different variations on the below to try and populate the select but can't find any that work</p>
  
  <pre><code> {"fields": [
                  {"name" : "Email", "label" : "Email", "type" : "text", "css" : "test"},
                  {"name" : "FirstName", "label" : "First Name", "type" : "text", "css" : "test"},
                  {"name" : "LastName", "label" : "Last Name", "type" : "text", "css" : "test"},
                  {"name" : "Company", "label" : "Company", "type" : "text", "css" : "test"},
                  {"name" : "ddlCountry", "label" : "Country", "type" : "select", "dataTextField" : "text", "dataValueField" : "value", "dataSource":[{"text" : "AF","value" : "Afghanistan"},{"text" : "AL","value" : "Albania"},{"text" : "DZ","value" : "Algeria"},{"text" : "AS","value" : "American Samoa"},{"text" : "AD","value" : "Andorra"},...etc...
  </code></pre>
  
  <p>and here is the script to bind it</p>
  
  <pre><code> $.ajax({
          url: "http://localhost/go/getformjson",
          type: "GET",
          dataType: "json",
          success: function (model) {
             // convert the JSON to observable object
              var viewModel = kendo.observable(model);
              // bind the model to the container
              kendo.bind($("#example"), viewModel);
          }
      });
  </code></pre>