Skip to content

Instantly share code, notes, and snippets.

@franzejr
Created June 10, 2012 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franzejr/2907598 to your computer and use it in GitHub Desktop.
Save franzejr/2907598 to your computer and use it in GitHub Desktop.
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