Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Simple TextField ext Form
//Ext on Ready function
Ext.onReady(function(){
//Creating a simple form
var formPanel = Ext.create('Ext.form.Panel', {
title: 'Panel Title',
widh:100,
height:200,
frame:true,
defaultType: 'textfield',
items: [
{
emptyText: 'Put Your Name here Please',
fieldLabel: 'First Name',
name: 'firstname'
},
{
emptyText: 'Put Your Name here Please',
fieldLabel: 'Your Last Name',
name: 'lastname'
},
],
buttons: [
{text: 'Ok',handler: function(){}},
{text: 'Reset',handler: function(){alert("Reset all fields! Not implemented ");}}
]
});
//Creating the window
Ext.create('Ext.window.Window',
{
title: "My First Window on ExtJS",
width:560,
height:200,
layout:'fit',
items:formPanel
}).show();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment