I am trying add form panel in dataView, i have ItemTPL where i have written divs and in that div I want to call Extjs Form Panel, But when i can call extjs form panel i get below error "[W] XTemplate evaluation exception: Cannot read property 'dom' of null"
getGrid: function () {
Ext.onReady(function(){
Ext.create('Ext.form.Panel', {
title: 'Support Ticket Request',
width: 650,
height: 500,
renderTo: 'myForm',
style: 'margin: 50px',
items: [{
xtype: 'container',
layout: 'hbox',
items: [{
xtype: 'textfield',
fieldLabel: 'First Name',
name: 'FirstName',
labelAlign: 'top',
cls: 'field-margin',
flex: 1
}, {
xtype: 'textfield',
fieldLabel: 'Last Name',
name: 'LastName',
labelAlign: 'top',
cls: 'field-margin',
flex: 1
}]
}]
});
});
return '<div id="myForm"></div>';
//return '<img src="resources/images/img2.jpg" class="shared-img" alt="Smiley face">';
},
'<div class="contents-wrap">' +
'<div class="shared-by"><a href="#">{name}</a> shared an image</div>' +
'{[this.getGrid()]}' +
'</div>'