title: ExtJs - Render object 'layout form' dynamically in DOM
body: <p>I have a function :</p>
  
  <pre><code>var my_form = function() {
      return {
          layout:'form',
          items: [
              {
                  xtype:'textfield',
                  fieldLabel: "Name",
                  maxLength: 255
              }
          ]
      };
  }
  </code></pre>
  
  <p>I want to render it dynamically. This doesn't work :</p>
  
  <pre><code>var t = Ext.DomHelper.createTemplate(my_form()).compile();
  Ext.DomHelper.insertBefore('my_div', t);
  </code></pre>
  
  <p>How to do this ?</p>
  
  <p>Thanks :)</p>