Created
June 10, 2012 22:59
-
-
Save franzejr/2907598 to your computer and use it in GitHub Desktop.
Simple TextField ext Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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