-
22 Feb 2013 1:42 AM #1
problem with ext form panel
problem with ext form panel
I don't know what is wrong with the following code ..
Please help me out..Code:Ext.onReady(function() { var myForm = Ext.extend(Ext.FormPanel,{ title : 'login Form', items : [ { fieldLabel : 'User Name', xtype : 'textfield', name : 'uName', allowBlank : false } ] , /*constructor : function (config){ config = config || {}; Ext.apply(this,config); }*/ initComponent: function(){ myForm.superclass.initComponent.call(this); } }); var f = new myForm(); f.render(document.body); });
-
23 Feb 2013 5:36 AM #2
Hi newusername,
Try the following code-
here is working sample example -http://jsfiddle.net/4tcbu/Code:Ext.onReady(function(){ var tab2 = new Ext.FormPanel({ cls: 'two-column-form', labelAlign: 'left', labelStyle: 'font-weight:bold;', labelWidth: 85, title: 'formname', bodyStyle:'padding:5px', scrollable:'true', border:'true', width: 500, height:400, defaults: {layout: 'form', border: false}, items: [{ itemCls: 'x-clear-left', xtype:'combo', fieldLabel: 'Company', name: 'company', value: 'Ext JS' } ], buttons: [ { text: 'Save' },{ text: 'Cancel' } ] }); tab2.render(document.body); });sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.


Reply With Quote